Java bootstrap rewrite

Fixed version of #366

```bash
git remote add up git@github.com:appium/appium.git
git checkout master
git fetch up
git reset --hard up/master
git cherry-pick e4cdc055f2786e47b746638831d0f925bebcad88
git cherry-pick f86ab19466822280219c89af705ca71e9d6910d7
git cherry-pick 3e97a2f7cd93124db479021d46d608eb5e15fd76
git cherry-pick 5fea476ecea3c5b222930828e7b6c44a5c3ec7c8
git cherry-pick 373563618847128ed07a8eaa7f4feb3b82e6fe4b
git cherry-pick ef501d71db1101b2b79bb5f13a4362cbc58a454a
git rebase -i HEAD~6
git branch -D java_bootstrap_rewrite
git checkout -b java_bootstrap_rewrite
git push git@github.com:bootstraponline/appium.git java_bootstrap_rewrite
```

`git add -u` was helpful when resolving conflicts.