Use macros for `shared_ptr` operations.

Shared pointers are handled differently by the OS X 10.9
and iOS 7 SDKs (appearing in `std::` on OS X and `std::tr1`
on iOS). Create and use macros for

+ `shared_ptr`
+ `static_pointer_cast` and
+ `dynamic_pointer_cast`

as well as update the namespace used by the existing
VES macros for using `enabled_shared_from_this`.
shared_ptr fixes building with libarchive and curl.
Merge topic 'shared_ptr-fixes'

63ce36ea shared_ptr fixes building with libarchive and curl.
86747111 Use macros for `shared_ptr` operations.