Add try-catch blocks and critical sections to wrap libgit functions in CGit::GetConfigValue(), CGit::SetConfigValue() and CGit::UnsetConfigValue()

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>