support ember server --proxy feature

Move api.php in api/ folder; using .htaccess to map every request to api/index.php
requires apache mod-rewrite module and permissions