fix annotation event-attaching; annotationChange event improvements

  - refactor the annotation creation and drawing methods so that
    events are only attached when the annotation is created.
  - refactor annotationChange event so that when it is fired, it
    passes the changed annotation's id and whether it was updated
    or deleted.
  - other minor code refactoring.