Correctly convert APInt to gmp values

Previously this happend to work for integers up to i64, but we got it wrong
for larger numbers. Fix this and add test cases to verify this keeps working.

Reported by: Sven Verdoolaege <skimo at kotnet dot org>

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@183986 91177308-0d34-0410-b5e6-96231b3b80d8