Move bin/apigen to src/apigen.php

It partially reverts d824e0206f477cf13c5782bb8cf48390d1a8946f

Directory src should work standalone.
Added bin/apigen
Merge pull request #359 from milo/pull-apigen.php

apigen.php in src directory