Added Base64 encode function and tests.
Added preliminary TileLayer XML serialization.