Add an internal version tracking system.

The system is stolen from a currently on-going project by me but is
useful to track the version number internally for testing.