SVG Overlay: have overlay in stack pixel coordinates

Keep the overlay in stack pixel coordinates to prevent alignment issues
after zooming. The coordinates currently used served little purpose
because they are dependent upon view geometry. Also simplifies
coordinate transforms.
Stack: remove offset calculation

It used to be necessary to query offsetWidth to force Firefox to
relayout and redraw, but this no longer seems to be the case. Remove the
query because of its performance impact in Chrome.
SVG Overlay: switch from Raphael to D3

Switch from Raphael to D3 for the SVG overlay in order to work directly
with the SVG elements to improve performance and enable additional
functionality.

This migration will be iterative over the next several commits. Also,
this is a direct port to D3, without code restructuring, so it is not
idiomatic D3 code.
SVG Overlay: remove mouse event catcher circles

Instead creating larger, separate, transparent SVG circles for every
node to catch mouse events, use a large transparent stroke on node
circles to acheive the same effect with half the number of SVG elements
and operations.
SVG Overlay: replace arrow lines with markers

Instead of having a separate line and arrow for connector edges, use a
normal line with a single defined SVG marker. Halves the number of SVG
elements required for these edges and greatly simplifies updates,
improving performance.
SVG Overlay: finish migration to D3

Now that some SVG elements have been removed or combined, finish
migrating from Raphael to D3 by fixing remaining errors and adding mouse
interactions.
SVG Overlay: outline node on hover
SVG Overlay: place confidence labels consistently

Confidence labels for connectors were being placed below the
corresponding edge, instead of above, due to transposed self/parent
locations (or rather their analog for connectors).
SVG Overlay: add scaling options

Add the ability to chose between fixed screen size and fixed stack size
scaling for skeleton annotation graphics in the SVG overlay. Add the
ability to adjust a base scale factor for each of these modes. Add both
of these options to the settings widget, and persist them in the user
profile.

To accommodate this, change the front- and back-end user profiles to
support non-boolean options.

Closes acardona/CATMAID#735.

This approach chooses slightly more complex solutions than necessary in
two cases:

1. Rather than update the scale on individual elements by looping
through them, as when updating node tuples, the scale is updated through
pseudo-static methods on the elements' concrete classes. This removes
edge cases with node interaction and helps prevent an intervening redraw
when changing zoom levels. There is some overhead in using SVG `use`
elements to achieve this, and it obfuscates some node circle code, but
the final result is faster (because of fewer attribute updates) and less
visually janky. The only elements that changes size only after a tuple
update are confidence text labels.

2. Three scaling factors are passed when scaling the elements. This is
another tradeoff between simplicity and visual jank -- the three factors
are necessary to let SVG scale edges natively with vector-effects in
screen scaling mode, while allowing a base scaling factor. The SVG
property is used because it scales edges immediately on zoom, rather
than waiting for a redraw (like confidence text labels), again reducing
visual jank.
Merge branch 'master' into refactors/scaleless-svg-overlay/mergeready
SVG Overlay: update radius tool to work with new overlay
SVG Overlay: correct stack translation

Since skeleton annotations should now be in project space, do not apply
stack translation in the phys-to-pix methods. Instead apply the
translation to the SVG viewBox as is already done for resolution and
scaling of the transform.
SVG Overlay: remove labels' Raphael dependency
SVG Overlay: remove debug output (minor)
SVG Overlay: update comment (minor)
SVG Overlay: correct middle click event handling

Also reformat handlers for clarity and display correct node ID in access
error message.
SVG Overlay: prevent text selection when dragging

D3 handles event propagation and default dragging behavior separately.
Disable both when dragging a node to prevent text labels and widget text
from being highlighted.
SVG Overlay: always scale new stacks

Scaling when sometimes not being applied when first opening the tracing
tool because the doNotUpdate flag was set. Have the overlay layer always
call the SkeletonElements scale function, and make the scale function
responsible for determining whether it actually needs to rescale to
avoid unnecessary SVG manipulation.
SVG Overlay: update scale as settings are adjusted
Merge pull request #807 from acardona/refactors/scaleless-svg-overlay/mergeready

SVG overlay scaling refactor