Refactoring of the code to ease the process of implementing new commands

Also an effort has been made to make the handler thread so that one
instance of FtpServerHandler could be reused.