skel: fix regression in alarms properties affecting dcache database commands

The elimination of scoping and db.* properties did not take into account the ability to run turn the alarm service off or to use xml.

Specifically, when alarms.db.type is not 'rdbms' dcache database ls should not report the presence of the alarm database, and more importantly, dcache database update should not attempt to run the liquibase changesets (since there may be no rdbms alarm database present at all).

This patch restores the correct behavior.

Testing done:

checked the database commands for correct behavior with alarms.db.type set to off, xml and rdbms.

Target: master
Require-notes: yes
Require-book: no
Acked-by: Paul

RELEASE NOTES:

If overriding the database name for alarms, be aware that alarms.db.type will not affect the dcache database commands; in particular, update will still attempt to run liquibase.  Thus any non-default setting for this property will require the actual presence of a database by that name.  Renaming is only relevant in the 'rdbms' case.
skel: add back datanucleus enhancer plugin dependency

Current master build breaks because plugin tries to add in 3.2.6 core for DataNucleus.

This is a known issue with the DataNucleus maven setup.

See http://stackoverflow.com/questions/877949/conflicting-versions-of-datanucleus-enhancer-in-a-maven-google-app-engine-project

Several different solutions are proposed there.

We may need to revisit this issue eventually.

Testing done:

After patch, build works.

Target: master
Require-notes: no
Require-book: no
Acked-by: Paul
Optimize configuration parser and shell oracle

The patch optimizes the representation of property annotations
by avoiding to parse the annotation several times. Instead the
AnnotatedKey instance is stored.

A further optimization is to store annotated keys in a
separate map, thus reducing the size of the hash table containing
the properties themselves, and also avoiding the need to filter
property keys. It also avoid the additional string concatenation
and hash computation to produce a special key for annotated keys.

Yet another optimization is to let getAnnotatedKey return null if
no annotation is found. The creation of an "empty" AnnotatedKey
is expensive as the regular expressions are still applied in the
constructor.

Finally, the shell oracle printer is updated to no longer output
deprecated properties. Such properties should not be reference
by any of our shell scripts. Not output deprecated properties both
speed up the printer itself, but more importantly it speeds up
calls to the getProperty shell function (because it is smaller).

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5829/
Optimize placeholder parsing and replacement

The patch applies several optimizations to the Formats#replaceKeywords
algorithm:

- Copy input to char[] to avoid repeated range checks in String#charAt

- Use ArrayDeque rather than synchronized Stack

- Write to existing StringBuilder rather than returning String, thus
  avoiding unnecessary copying of the output

- Only read the input once - the old algorithm used several passes
  to process nested placeholders

- Don't use an explicit state machine - use Java's control flow
  statements instead

- Specify a length when creating StringBuilders - for the common case
  of placeholder less values, this avoid resizing StringBuilders

- Reduce use of StringBuilder#append(char) and instead append a
  range of the input array. This reduces the number of capacity checks
  the StringBuilder has to do.

I had to adjust several unit tests. To me those tests looked like
encoding perculiarities of the old parser rather than intended behaviour.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5833/
Optimize quote functions in ShellOracleLayoutPrinter

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5834/
Add dcache prefix to domain properties

To avoid conflicts with service name spaces, non-service
properties should be under the dcache hieararchy.

New properties

dcache.domain.preload
dcache.domain.service.dir
dcache.domain.service.uri.base
dcache.domain.service.uri

Deprecated properties

domain.preload
domain.service.dir
domain.service.uri.base
domain.service.uri

Target: trunk
Require-notes: yes
Require-book: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5827/
Add dcache prefix to net properties

New properties

dcache.net.wan.port.min
dcache.net.wan.port.max
dcache.net.lan.port.min
dcache.net.lan.port.max
dcache.net.inetaddr.lifetime

Deprecated properties

net.wan.port.min
net.wan.port.max
net.lan.port.min
net.lan.port.max
net.inetaddr.lifetime

Target: trunk
Require-book: yes
Require-notes: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5828/