api: tests: added clearDb function to configure to clear collections, restart db connection, and ensure indexes
api: tests: added clearDb function to configure to clear collections, restart db connection, and ensure indexes

prateekbhatt/userjoy,prateekbhatt/userjoy,prateekbhatt/userjoy