Fixes drawing and resizing bug when in edit mode (#69).

Also fixes possible race conditions when in editing mode and update is
called from the outside.
Prevents temporary statuses to be saved to the DB.
Prevents too many note changes notifications.
Fixes some issues with determining the correct UI state of a note.

Note is now correctly rendered

- when the edit popup is closed through a click on the note (hover
  state).
- when the note is minimized. The z-index is not reset anymore.
- when the mouse courser happens to be over a note when switching focus
  to the browser window (hover state).
Version 0.8.0.1