Add some methods to serialize an inventory to Base64 string.

Special thanks to Comphenix, @aadnk, for the code.