Refactor: libcrmcommon: Reduce duplication in env get/set
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>