Optimized checks on resource file types

This optimization was suggested by David Naramski on the Bonita community Jira:
https://bonita.atlassian.net/browse/BBPMC-112
Merge pull request #2 from pozil/patch-1

Optimized checks on resource file types in ApplicationResourceCacheFilter