MINOR: simplify operation use via covariance.

When FooOperation override execute, it now returns FooOperationResult rather
than OperationResult, leveraging the covariance possibilities introduced in
Java 5.
MINOR: fix a bug in database xml reading when the file size was read as an int rather than a long.
MINOR: minimal fix for the long id problem.

Each new file is assigned an id which is a random long. The set of long is small enough (2^64) to induce a (very limited) collision risk (see http://en.wikipedia.org/wiki/Birthday_attack). With this patch, up to 10 ids are generated in order to reduce further the risk and collisions are detected. The long term fix will imply increasing the id to a 2^128 space.
MINOR: Merge Fabrice's changes (more solid file history ID, operation covariance, xml dao int/long fix)