Speed improvements on loading repos which have lots of branches

On repositories which have greater than 30 branches active at the same time
then this change decreases the time take to load up a repository. On repositories
which contain a small number of branches then the is little to no change.
Refactoring the add commit routines into a more manageable functions

This commit makes a start on the tidy up of the commit creation code. It
does this by splitting common code into there own functions where possible.

 - It changes from using QVectors to QSets so lookup is faster.
 - Removing un-needed states from the CommitType enum
 - Adding some much needed comments to make it easier to understand what
   each section of code is doing.
Added ability to add and remove tags on a commit

 - Adding a tag will give a dialog box which the tag name can be entered
   into.

 - Removing a tag will happen automatically if there is only one tag. If
   there is more than one tag a combo box will be given with the commits
   tags for the user to choose from.