Refactor existing endpoint filter tests

Refactored the existing suite of endpoint filter tests including
renaming method names to aid readability and added additional
comments.

Change-Id: I98ded2632a6130e2b664e987f08499162801be6b
Remove `with_lockmode` use from Trust SQL backend.

Due to the lack of support of `SELECT .. FOR UPDATE` call in
MySQL + Galera, the use of `with_lockmode('update')` needs to be
removed from the Trust SQL backend when utilizing the MySQL
dialect.

Instead of the pessimistic locking method (row lock, table lock),
use optimistic locking. The consume_use method now attempts to
update the remaining_uses column for the trust in question only
if the remaining_uses equal the same number as on the initial
query. This is done in a loop with a 10-iteration failsafe to
prevent endless looping.

Change-Id: I1b8af6ce5709f829f345cd351ec9242d0217e743
Closes-Bug: #1325143
Merge "Refactor existing endpoint filter tests"
Remove unused function

_assertNotifySeen was not being called.

Change-Id: I1f76aede7d1d3e6092c8e2bafa4af6c5eb5b74a3
Merge "Remove `with_lockmode` use from Trust SQL backend."