Move pageState into logic to mirror other classes

Having the page state extraction in one location minimizes errors caused
by typos and updating variable names.
Refactor single-assignment page, separated fcns

The large functions were making it hard to implement additional
functionality.
fixed typo
Edit assignment button now works
Correct screenshot is shown on assignment page
Replaced argument list with $args object

An object containing the arguments makes the function more extensible.
fixed redirect typo
grammar
Assignment creation works with new attachment functions
Professors can now edit assignment screenshots

Selecting a new preview image overwrites the currently existing one.

TODO Look into allowing multiple screenshots to be associated with the
assignment.

Addresses issue https://github.com/kelvinhsung/GTCS12/issues/30
Refactored assignment submission form

The assignment submission form is now it's own page and can be included
in the different pages. This makes it easier to modify the assignment
submission process (images/applet/etc.) look and feel without constant
switching between pages.

The refactor also made it easier to implement jar uploads for Professor
assignments, which addresses issue
https://github.com/kelvinhsung/GTCS12/issues/29 and
https://github.com/kelvinhsung/GTCS12/issues/30.