Fixed clear and delete bugs

The clear and delete methods now have a new optional parameter
‘canRemoveMetadata’. This is a boolean flag that indicated if an
objects _objectMeta property is removed from objects before delete or
clear. Otherwise the _objectMeta.status property is returned to its
original state before delete or clear.