GEOT_4792: optimizations for the JDBCDataStore.ensureAuthorization method

This patch does the following optimizations:
 * introduces fetchSize usage also for basic statements, not only for PreparedStatements, in ensureAuthorization to avoid loading all features in memory during locks check
 * avoids locks checking on db if there are no locks defined for the featureType
 * intersect given filter and a filter for the locked ids to extract only useful records if locked fids are < 100