close #2443

- Reactor API tests from `/core/test/functional/api` to
  `/core/test/functional/routes/api`, using supertest instead of request
- Merge ErisDS/issue-2442, in order to close the httpserver
- Remove `/core/test/functional/api` folder
- Using .expect() to check status code