Update libffi to 3.1

Update libffi to 3.1 to add support for new architectures.