Recreated API and excluded it to a single class including unittests

With the new environment variable, I was able to create a complete abstracted API without any change in bitmessagemain.
Also the logfilelocation-problem should be solved.

It can be used like:
import class_api
api = class_api.getAPI(workingdir='/tmp/testfolder',silent=True)
api.[...]
api.stop()