Free strings returned by XGetAtomName to avoid leakage.
replace 0s with NULLs, as discussed at https://github.com/libRocket/libRocket/pull/127