text: Title: Restructure the functions in anomaly data output view API
  Body: Right now, the controller method and the API endpoint both exist [in the same file](https://github.com/chaos-genius/chaos_genius/blob/main/chaos_genius/views/anomaly_data_view.py
  ) 
  We need to restructure and refactor some functions.
  - [ ] Create a new file `anomaly_data_controller.py` inside the controller folder
  - [ ] Move the functions which are interacting with DB in the controller file and import from there in the `anomaly_data_view.py`