Exec refactoring

Remember to merge https://github.com/appium/appium/pull/4103 after this.
in many cases the default isn't enough and then we get a strange incomprehensible "Max stdout exceeded" error that makes no sense and can sometimes appear randomly.