Switched search page to use json and added csv download for it.

Added statistic model and added it to the redirect controller

created ajax route on report controller to retrivie default values for report/search criteria, moved that code base to the pid.js file
Fixed some test issues that were creating by moving search page integration tests over to client side tests since the search page is now json parsed by jquery