allow overriding cache id and tag validation

Fixes:
http://www.zendframework.com/issues/browse/ZF-11430

This allows overriding validation of cache tags/ids.

_validateIdOrTag and _validateTagsArray could be changed to non static, but I left it as is for compatibility reasons.