Implement AutoCommandHandler, add factory.

Change-Id: I37c628aefc6be01bbfaec0eb0d1d69c82acaa463
Reviewed-on: http://gerrit.dmdirc.com/3753
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>