Delay job sending finished notification mail

We have been running into the problem that the finished time in
notification mails was given as "None" sometimes, presumably because the
task for sending it started running before the original transaction to
set the job state was fully committed.

This commit will hopefully fix that.
Fix internal server error in jobqueue view
Replace state column in jobs list with icon
Undo changing subjob toggle icon

The collapse- up/down icons didn't work.
Merge pull request #295 from guidow/fix_top_level_queue_view

Fix internal server error in jobqueue view
Show number of active agents in job view
Track CPU names of agents
Track OS class for agents
Track full OS names for agents
Adopt tests to two new agent columns
Merge pull request #294 from guidow/delay_job_finished_mail

Delay sending job finished notification mail
Merge pull request #297 from guidow/icon_for_state

Replace state column in jobs list with icon
Merge pull request #298 from guidow/num_active_agents_in_job_view

Show number of active agents in job view
Merge pull request #301 from guidow/track_agent_os

Track agent os
Merge remote-tracking branch 'guidow/track_agent_cpu_names'

Conflicts:
	pyfarm/master/templates/pyfarm/user_interface/agent.html
	pyfarm/models/agent.py
	pyfarm/models/core/cfg.py
	tests/test_master/test_agent_api.py
Track MAC addresses of agents
Explicitly disable auto increment for MySQL
Deal better with empty MAC addresses

Agents on Windows soemtimes include an empty MAC address in the list.
This is a simple workaround to deal with that.

Of course, the agent should not be sending values like that in the first
place.
Simplify turning all mac addresses to lower case
Move checkInteger code inline

The checkInteger method was short and used only in one place.