Fix #13741. Make wrap/unwrap methods optional; close gh-1236.

move size() test to unit/deprecated;
don't use size() in other tests;
make 2 unit tests actually fire;
code cleanup