_validate records in bunch of RECORD_CACHE_SIZE

This is required in order to prevent invalidating the LRU cache too often

review3061002
Access sql related errors only if Model is a subclass of ModelSQL

review3111002
issue3628