Fix wrong lock name for operating instance external events

This patch correct the wrong lock name for operating instance events.
Currently it use function object InstanceEvents._lock_name as the lock
name, the lock name will be like "<function _lock_name at 0x7fe6a7edec08>".
So when process the server external event, it will use one lock for all
the events that may belong to different instances. This isn't efficient.
This patch correct it to invoke InstanceEvents._lock_name to get the lock
name as '<instance-uuid>-events'. Then the lock is per instance.

Change-Id: I57712afe893933fde6ea7ab3f5d6328f04c65a8a
Closes-Bug: #1330431
Merge "Fix wrong lock name for operating instance external events"