Merge pull request #505 from dalkon/master

Some fixes.
Fix crash with stopEvent

The server would crash when stopEvent was being called from an event on
the event itself.
Use && for std::move result