Generalize Template Haskell nonsense

It's now a more generic KeyedEnum thingy.

Also rework some protocol system stuff.
Begin implementing the Quassel protocol.
Completely rework the protocol system
Merge branch 'master' into feature_quassel

Conflicts:
	ChatCore/CoreController.hs
	chatcore.cabal
Port Quassel protocol to the new protocol system