src: Added a number of Python modules for calculating stats on different kinds of tests and added the necessary sql queries to db_commands.