Reorg code to a library rather than executable

GAE application of golang is required to be written to a package rather
than an executable.
Beside, irc msg parameters parsing is fixed.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>