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
Okay I will check it out, chances are I will just reset the datastore for that sql-view workflow.

Yeah I do not know why the datastore resource pool clear was introduced here - perhaps due sql views. I will update the pull request based on this conversation.