ManifestUpdateMojo: null checks for xml version/encoding

Added null checks for writing the xml version/encoding. This is needed when updating a Merged manifest at build time. e.g. - updating the versionName in SNAPSHOT builds with a build timestamp.

The SDK manifest merging process removes the xml version/encoding defined in the original APK manifest from the merged manifest.