Allows use of out-of-order revision numbers

We kept running into issues of merge conflicts between developers working on different branches while trying to use a sequential revision model.

This patch allows developers to use revision numbers which may be out of order by recording the revisions which have been applied and comparing this to all the revisions present.  Developers can then use any appropriate revision number such as a combination of issue number and timestamp to track revisions which can be later merged together.  

It does not attempt to resolve conflicts between different revisions, that's left as a task to the user.

When used on an installation with the former concept of revisions, it will initially load the revisions in the same way the previous version did; then it saves this using the new concept.