Introduce WriteTree2 as a more performant (up to 4 fold) replacement of WriteTree

This patch it meant to have a big impact on commit performance, especially on
large imports. It uses DeepMove in a more clever way, which was adapted to
use ObjectDatabase.putAll<Iterator<RevObject>> as much as possible and hence
be able of bulk moving lots of objects from the index to the repository db.

WriteTree2 also use the new TreeDifference helper class which quickly computes
what trees have changed between the two roots and allows WriteTree2 to gracefuly
handle situations that don't require as much transfers as tree renames and pure
metadataId changes.
Merge pull request #379 from groldan/WriteTree_squashed

Introduce WriteTree2 as a more performant replacement of WriteTree
move the GPL license to the web/geoserver module, it was accidentaly put in the geotools one.
update version from 0.4-SNAPSHOT to 0.5-SNAPSHOT
tmp