[resources] Release file pointers after use

The open_png was opening files but not closing them. Fixed
by providing a close function and making the client responsible
of closing the resources needed for png files after use.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jolla.com>