Created post categories for Assignments and Submissions

Assigning categories to the posts allows for simpler queries as well as
giving the posts more semantic relevance.
Pulled latest changes from gtcs12_db.php

First step in reducing all dependencies on gtcs12_db.php
Updated to match style of other classes
Removed permission validation from function calls

The validation should be done before these low level calls are made.
Removed empty data test cases

This test file is used to test normal scenarios.
Updated to use common/{system}.php functions

Explicitly including and scoping the function you're using results in a
more modular system and makes it easier for Doxygen to create the call
graph.
Finished migration to common/{system}.php function system
Removed extra semi-colon
Updated variable names to match other pages
Fixed typo in link href
Changed POST parameter from year to courseYear

Passing in "year" as a post parameter was causing the page to fail to load.
whitespace
Updated variable names to match other pages
Fixed missing function error
Added function to easily check if variables are set

Several methods follow the pattern of reading variables from $_POST or $_GET
and failing if any of them are not correctly set. This function makes it
simpler to trigger warnings for these unset variables and allow the calling
function to return an error.
Added comments
Moved state variable extraction into logic

Having the variables in so many different places leads to errors when one
variable needs to be updated.
Fixed typos
Fails and returns understandable output on invalid POST
Fixed error in page state update