Use flexbox when available.

Makes things actually work on firefox.
Prevent click event on sort

Unlike most browsers, firefox raises the click event even if an element
has been removed/re-inserted between mouseup/mousedown events. This
means that it was getting fired on sort.
Don't hide subsequent elements of shrunken notes.

This causes notes to be clipped in odd places (at formatting changes
etc.)
added text field for links
fixed button position