Use WKRetainPtr on some places where their use reduce the code size.

Reviewed by: Nick Diego Yamane