Add API endpoint for importing projects

Problem to solve

Importing repos from Github, Bitbucket etc via an API endpoint/s.

Further details

We can currently import repos via the UI but that functionality is not available in the API. The proposed changes would allow for the importing of external repos via the API.

I've had a quick attempt at implementing this functionality myself and managed to get it to work for Github. It's rough and could probably use some improvements (Rails is not my strongest) but it works.

Proposal

We'd be introducing the same importing functionality that's available via the UI to the API.

From my experimenting, it seems that the implementation would be fairly straight forward since the UI is already accessing some type of API to fire off the imports.