synchronize access to Database's changeListeners list

Iteration over the changeListeners in Database.notifyChange can throw a
ConcurrentModificationException if addChangeListener or
removeChangeListener is called from another thread.
Merge pull request #26 from mjq/sync_listeners

synchronize access to Database's changeListeners list