Simplify code and provide new API load-resource-image

This commit changes the API, specifically `load-image`, which is now a more generic function and moves it implementation to `load-resource-image`.