Add interface for things that want to quit.

Allows us to pass in a sensible reference to things like the /exit
command, instead of a Main object or calling a method statically.

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