EST-341: changing the LeaseTerms repositories to use JDOQL

nb: depends on ISIS-698.