docs: fix weak_ptr example and clarify ownership semantics

Fix weak_ptr example and clarify ownership semantics

The weak pointer example incorrectly used auto, which created another
shared_ptr instead of a weak_ptr.

I made a PR : https://github.com/exercism/cpp/pull/1043