Cleanup toMetadataRecord, for usage manager

- Don’t store entity.id, because usage event already has that.
- Change “64bit” to “is64bit”, because if writing to relational
  database the columns don’t want to start with a number.
Terminate UsageManager (and wait for usage listeners)

- also tracks how many uncompleted listener events there are,
  and reports this on termination.
LocationEvent/UsageEvent hashCode+equals

- Useful for tests.
- As is constructor that takes Date.
This closes #330