Optimized checks on resource file types in ApplicationResourceCacheFilter

This optimization was suggested by David Naramski on the Bonita community Jira:
https://bonita.atlassian.net/browse/BBPMC-112