os. Add eof method to resource and resource stream.

The eof method is based on remaining asset length call.
Add validate resource utility method to resource stream, and change read method to use it.