added Group support, inserting student results

Added support to store and query students in groups. Added support for
inserting student results. Optimised all_results view. Updated spms.sql
to reflect this.