Support weak WebPrivatePtr<>s.

Parameterize WebPrivatePtr<> over the strength of the reference it maintains:

 WebPtrivatePtr<T, crossThreadDestruction, strongOrWeak>

where

 crossThreadDestruction = WebPrivatePtrDestruction{SameThread, CrossThread}
 strongOrWeak = WebPrivatePtrStrength::{Normal, Weak}

If Normal, the reference is the normal strong kind, which means either
a RefPtr<> or a strong off-heap (CrossThread)Persistent<T> Oilpan reference.

If Weak, the Oilpan reference will be (CrossThread)WeakPersistent<T>, meaning
that the WebPrivatePtr<> will not keep the object alive on its own. Any
dereference of the WebPrivatePtr<> will consequently have to check if the
reference has been cleared before using.

The abstraction doesn't currently support weak non-Oilpan references.

R=
BUG=

Review URL: https://codereview.chromium.org/1618043003

Cr-Commit-Position: refs/heads/master@{#372324}
1 file changed