Pull the real-time indexing blocking/queuing logic into a dedicated class.

We'll use this for handling notifications too.
New notifications engine (replacing webhooks)
More build.xml port corrections
Have the setup-database.sh and configure-tomcat.sh scripts honour JAVA_OPTS too
Cope with shell metacharacters in JAVA_OPTS.
Horrible shell escaping hackery.  I feel bad.
Merge pull request #337 from hudmol/webhooks-replacement

Webhooks replacement