Set up key timeout on download using Redis.

Given 60 seconds, although the upload route does not currently check
that the key still exists.
Made notification messages local variables.
Created countdown timer on download.

Animates using the Bootstrap progress bar.
Refactored usage of connect-flash.

Set up middleware that provides the error, warn, info, and log
variables to the view engine, rather than needing to do so in every
place.

Note that we decided there was no point to adding the message to the
session state for GET requests that do not cause a redirect.
Report errors back to user on failed upload.

Uses connect-flash and makes decisions about what location to redirect
to in the case of an error.
Load available graph submissions from database.

Performs a time-range query to retrieve a list of graphs for which
submissions can be made.
Added validation of the submission name on upload.

Responds with a 400 status code otherwise.
Extended validation to index and download routes.
Fixed issue where was extracting wrong matches.

Also needed to convert the values from string to integers.
Copied submission to team specific directory.

Also puts the time in the filename to avoid conflicts when submitting
mutliple times during the same upload session.
Discard invalid output file if one was created.
Record submission in database.
Checks when a (successful) submission has occurred.

Not really the logic we actually care about when trying to prevent a
user from downloading the file, not uploading, then downloading again
later to effectively reset the timer. Need to keep track of when a
graph has been downloaded.
Fixed logic to keep track of attempts made.

When the graph is first downloaded, a document containing the team id
and the submission name are stored in a collection. No subsequent
downloads will cause the key to be set in Redis.

During the time period when submissions are accepted, each successful
attempt pushes a timestamp onto an array of the previously mentioned
document.
Enforce that key exists in Redis to upload.
Replaced usage of safe with write concern.