CORE-1844 bulkFetch of foreign keys on Oracle is very slow

Filtered out deleted constraint entries
CORE-2145 junit should be in scope test, not compile

Added optional=true attribute