adds an fallback for APPLICATION_DATA_DIRECTORY

as described in ticket TRUNK-3934: in some deployments using an application server such as Tomcat, we can not write to the current users home dir and instead should use a more generic and/or appropriate path
TRUNK-4160 ProgramWorkflowService.retireProgram always throws Exception
TRUNK-4160 Review comments
TRUNK-4146:add unit test to prove return distinct drugs when search parameter match multiple times with drug_name
TRUNK-4223: SonarQube - instanceof will always return true
Added automated tests for org.openmrs.api.db.hibernate.HibernatePatientDAO and org.openmrs.api.db.hibernate.PatientSearchCriteria
Refactored org.openmrs.api.db.hibernate.PatientSearchCriteria
Added and implemented org.openmrs.api.db.PatientDAO#getPatients(String,Integer,Integer)
Added and implemented org.openmrs.api.db.PatientDAO#getCountOfPatients(String)
Marked org.openmrs.api.db.PatientDAO#getPatients(String,String,List,boolean,Integer,Integer) as deprecated
Marked org.openmrs.api.db.PatientDAO#getCountOfPatients(String,String,List,boolean,boolean) as deprecated
Moved tests from org.openmrs.api.db.hibernate.HibernatePatientDAOTest to org.openmrs.api.db.PatientDAOTest
TRUNK-4229 SonarQube - Array is stored directly
TRUNK-4046 hide start visit button for dead patients
TRUNK-4146:change the test case and test data set
Merge pull request #555 from kkaczmarczyk/TRUNK-4229

TRUNK-4229 SonarQube - Array is stored directly
Merge pull request #552 from mszukalski/TRUNK-4223

TRUNK-4223: SonarQube - instanceof will always return true
TRUNK-4228: SonarQube - Nullcheck of value previously dereferenced
Merge pull request #498 from WolfSchlegel/TRUNK-2472-B

added automated tests for patient search
TRUNK-4230 SonarQube - Inefficient use of keySet iterator instead of entrySet iterator
Merge pull request #560 from kkaczmarczyk/TRUNK-4230

TRUNK-4230 SonarQube - Inefficient use of keySet iterator instead of entrySet iterator
Merge pull request #519 from dkithmal/TRUNK-4146

TRUNK-4146:add unit test to prove return distinct drugs when search para...
Added use@link in to comments
Merge pull request #557 from vaibhav-hp/TRUNK-4046

TRUNK-4046 hide start visit button for dead patients
Merge pull request #497 from usn1485/master

TRUNK-4160 ProgramWorkflowService.retireProgram always throws Exception
Bug in PersonAttribute.compareTo - TRUNK-3826