Store parent of each revision

This allows us to keep track of actions such as reverting a page to specific
revision. This isn't strictly required at this point, but defiitely opens up
new possibilities for later development.
Switch from sha256 to faster sha1 for file hashes
Fix strict standards issue
Revert earlier file related optimisations

The way WireArray indexes it's items and removes duplicates wasn't compatible
with naming stored files by file hashes alone. Including original filename in
the name of each stored file might make things slightly less effective, but
also reduces the need for ugly hacks, making it the best option for now.

Also: make it possible to preview current revision via History tab.