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
Merge pull request #179 from pynag/fix-eventhandler-calls-on-copy

Fix eventhandlers not called on copy object