Move main method to its own class under src/test/java/ and use the Debug.run() method.

As suggested by Johannes Schindelin, this will make the API cleaner and allow us to debug the plugin from the IDE.