Corrected logic for active projects code. 

This includes additions to the KPI and KPI_application map functions in statusdb to also emit "Close date". 
Already closed projects are now excluded from active projects.
Also, ongoing projects without queue date but with libQC date are now counted as being in sequencing.

The number of active projects in different process steps should now be correct.