Allow for detaching the repository's head

Currently we can only adjust the repository ```HEAD``` by setting it to a reference. Allow for setting it directly to a commit.

Side-effect:
```head()``` now also takes an optional ```$message``` parameter which will be written to the reflog.