Added route GET '/companies/:id/stats/:type' for historical stats of company
Added getStats and queryStats functions in companies model to query db