Adding new search participant utility

Allows for complex search of participant based on address, phone, participant and note details
Merge remote branch 'origin/develop' into qa
Pushing devlepment to version 0.2.4
Preventing changes to positive consent after withdraw

Once participant.withdraw_letter is set no changes can be made to a
participant's positive consent status.  This is to prevent them from
being automatically re-added after they have withdrawn.
Fixing warning caused by last commit
Merge remote branch 'origin/qa' into release
Merge remote branch 'origin/release' into develop
Replacing participant.status with new state table

Participant conditions (states) can now be managed by administrators and
each role can be restricted to only setting certain states.
NOTE: this commit does not include the UI code to enable editing of states.
Replacing participant.status with new state table (completed)

Implementation of UI elements.
Fixing bug in participant report
Fixing warning caused by change to consent record

When checking whether a participant's withdraw_letter has been set
before adding a new consent record the participant_id is not always
set.  This was causing warnings in the log.
Tweaking last commit (using better logic test in if statement)
Final fix for consent::save() bug
Fixes for bugs caused by new participant state system
Tracking changes to participant email addresses

- email addresses are now validated using simple word@word.word validation
- any change to a participant's email address is tracked by date and time
- a new email report has been created which provides a list of all participants with new email addresses
Adding automatic tertiary table-joining to N-to-N joins

When an N-to-N table join includes a reference to a tertiary table with a foreign key in any
of the N-to-N tables it is automatically joined to
Merge remote branch 'origin/qa' into develop
Restricting participant active status to adminsitrators only
Fixing bugs
Fixing bug and tweaking states

The state record has a rank in it, so it now extends the has_rank class.
The role_has_state table how cascades on delete.
The number of participants using a state is now included in the state
list and view.