Turns out that Enablers as typically used for
member functions don't work to select
constructors.
Move this selection logic to
struct detail::static_shared_vector_caster<>
to correctly allow no-op casts (eg. void to void).
Previously this would not compile.
Allows PVScalarArray getAs() and putFrom() using
shared_vector<const void>.
It seems that shared_ptr::use_count() does
not include weak_ptr instances. Therefore
shared_ptr::use_count()==1 (aka unique())
does *not* ensure exclusive ownership!
This breaks the assumption used by
shared_vector::make_unique() to avoid
allocating a new array in some cases.
pass values by reference where appropriate.
When reallocating arrays of shared_ptr
"move" with swap() instead of operator=
to avoid ref counter inc and dec for each
element.