Fix so that when the user doesn't have permission on an annotation and the annotator instance is readOnly it will not try to hide the undefined controls
Merge pull request #162 from deds/master

fix so that users without update/delete permissions on readOnly annotator doesn't try to operate on non-existent controls
get the lowest common ancestor instead of highest

Fix #166 as reported by @jujug42
Use empty string if prefix is unset or null

This fixes #175. Previously, the prefix defaulted to '/', which results in
`_urlFor` returning URLs of the form '//annotations', which the browser
interprets as a protocol-agnostic full URL.

The fallback prefix should be '', and the check for existence of
`@options.prefix` should not magically convert the empty string into a single
slash.
Add redo paths to gitignore
Bump version -> v1.2.6
Add tests for empty-string prefix
Remove unused option in Store plugin
Alphabetise options
Provide emulation of PUT/DELETE in Store plugin

As requested in #180 (see also #172), this adds an `emulateHTTP` option to the
Store plugin, which allows Annotator to emulate PUT/DELETE for old webservers
that don't understand these methods. If `emulateHTTP` is true, then Annotator
will sent PUT and DELETE requests as POSTs, setting a request header to denote
the desired method:

    X-HTTP-Method-Override: DELETE

See [Backbone's `emulateHTTP`][1] for reference:

[1]: http://backbonejs.org/#Sync-emulateHTTP
Provide emulation of JSON post in Store plugin

As requested in #180 (see also #172), this adds an `emulateJSON` option to the
Store plugin, which allows Annotator to communicate with legacy webservers
that don't much like POSTS with `application/json` type payloads. Instead, the
data to be sent is JSON encoded client-side and is sent as a standard form
request (with content-type `application/x-www-form-urlencoded`) with the JSON
stored in the `json` key.

In addition, if `emulateHTTP` is also set, the Store will add a `_method` key
to the form, containing the same value as the `X-HTTP-Method-Override` header.
Use closures to separate create vs update

Rather than using the presence of a `ranges` property on an annotation
to determine whether it is new or updated, track that information via
one-shot closures subscribed to the editor events. The proper
subscriber registers via the callbacks for adder and annotation edit
clicks where it is known for certain if the annotation is new or
updated.