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

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'.

Ref's destructor  should be protected.