libwinpr-handle: reduce usage of unneeded handle management functions