objstr: Add str.encode() and bytes.decode() methods.

These largely duplicate str() & bytes() constructors' functionality,
but can be used to achieve Python2 compatibility.
py: Make bytes type hashable.