Building CacheStore using generics

Closes #897. This change solves problems when deploy a vraptor application under Wildfly 8.2, that uses Weld 2.2. This version compare generic types to decide the bean to inject.

Related to #902.