Updated Java code to make it easier to extend, and improved memory usage

Now uses a hash to store the command classes and doesn't have to create
a new instance each time a command comes in.
Also, the AndroidCommandExecutor is created only once.
There is now a map of available actions, to handlers.