WeakRef: fixed broken const semantics.
WeakRef: fixed broken const semantics.

'const WeakRef<T>' behaved like 'T const*'; now behaves like 'T* const'.
'WeakRef<const T>' has now has the pointer-to-const behavior. This is consistent
with the standard smart pointers.

Also replaced casts to char* with casts to intptr_t (should not have any impact on beahvior).

Oberon00/jd,Oberon00/jd