Fix eventhandlers not called on copy object

In some cases where a host is copied to a new
file, the eventhandler 'save' was not called.

This patch fixes a bug in ObjectDefinition.save()
where the method was returned prematurely in case
we were writing to a new file.

Also added new unit test class for eventhandler calls.

Fixes opinkerfi/adagios#454