Behave tests refactoring

- extract class to manage the start and stop of the api process during feature tests
- explicitly wait for api to start, and fail the test in case of errors