LPS-44052 Do not leave file handles open

We ware evaluating problems with deployment of LifeRay to WildFly 8 described in
https://issues.jboss.org/browse/WFLY-2862
Problem was traced to the way LifeRay gets timestamps which leaves files handles open until GC cleans them up.
With this fix applied users are not seeing problems with "too many open files" anymore.

I have also fix for 6.2.x branch, but I dont see that branch in this repository.
my changes can be found here https://github.com/ctomc/liferay-portal/tree/file-handle-fix-6x