closed #4106: Object which isn't in Vector would also be released when invoking Vector::eraseObject.

1) Also refactored 'Vector::eraseObject':
* Removed 'toRelease' parameter, Vector class should manage reference count.
* Added 'removeAll' parameter to decide wether to remove all elements with the same value or just the first occurrence .
* Added relevant UnitTest for 'Vector::eraseObject'.

2) Ref's constructor  should be protected.