Tweaks to get_access_sql_suffix based on feedback from @cash.
Removed get_access_restriction_sql.
Added a basic unit test for the new plugin hook. #3047