Check params before clearing dataStoreCache (GEOS-6575)

See https://jira.codehaus.org/browse/GEOS-6575 for discussion.

Initial review here https://github.com/geoserver/geoserver/pull/668
It was originally copied to write a new javadocs, and introduce some delay action. Since checking the connection parameters appears to be sufficient I can probably remove this method.