Added dispose logic to external resources

Evne though they probably won't ever be triggered, closes #120.
Also, cursor is a resource.