bug-fix: classification adjudication rank count

- the determination of max ranked classification or
  alpha_numeric test_entry daughter tables is based on
  non null word_id column, but this will fail if no words
  are entered in either of two adjudicatable tests if the
  audio or participant status voids the need for such entries
bug-fix: continue with last commit fix

- cannot clone a non-object (array), get the last record in
  the array instead
- when audio or participant status dictates no transcription data need
  be entered, clear out the adjudicate record if there is one for
  the test_entry if it is a progenitor
performance + security enhancements

- user database class format method for sprintf of id column values
- use direct sql in assignment class to check all tests complete
bug-fix: trying to eliminate deadlocks

- when assignment_manager attempts to complete and assignment,
  it identifies any adjudications and sets the adjudicate column
  of the assignment's and its sibling's test_entry records, which
  can lead to a deadlock if the sibling is currently being worked on.
  Add create and release semaphore bracketing the adjudication loop.
- security enhance: use database_class format on an id in the sql query
  that deletes adjudicate test_entry daughter records
bug-fix: trying to eliminate deadlocks

- add session create and release semaphore to try and
  eliminate deadlocks
bug-fix: fixing reports

- use direct sql queries to imrove performance
- remove deferral counts from productivity report
add index for productivity report, mod widget desc

- add an index on test_id
- update report description since deferred counts were removed
Merge remote branch 'origin/release' into qa

Conflicts:
	api/business/assignment_manager.class.php
	api/database/test_entry.class.php