Handle callbacks imports better in the parser

Change-Id: Ib561477b4fbb5eeef0fa459a9bf20f7f37720f7b
Reviewed-on: http://gerrit.dmdirc.com/3618
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>