Added simple test to check if there are any non-associated (with an event) visual fields available, when viewing a patient. If there are, they are imported.
Added auditing.
Tidied up code and re-structured it.
Merge branch 'feature/restapi' into release/1.2.1-cardiff

Conflicts:
	protected/controllers/EsbRestApiController.php
	protected/controllers/PatientController.php
	protected/controllers/RestfulController.php