Write a function that returns the closest palindrome number to an integer. If two palindrome numbers tie in absolute distance, return the smaller number.
ClosestPalindrome(887) ➞ 888
ClosestPalindrome(100) ➞ 99
// 99 and 101 are equally distant, so we return the smaller palindrome.
ClosestPalindrome(888) ➞ 888
ClosestPalindrome(27) ➞ 22If the number itself is a palindrome, return that number.