Low-level memory allocation functions

TESTS:

Check that a MemoryError is raised if we try to allocate a ridiculously large integer, see trac ticket #15363:

sage: 2^(2^63-2)
Traceback (most recent call last):
...
RuntimeError: exponent must be at most 2147483647          # 32-bit
MemoryError: failed to allocate 1152921504606847008 bytes  # 64-bit

AUTHORS:

sage.ext.memory.init_memory_functions()

Set the MPIR/GMP memory functions to the above functions.

EXAMPLES:

sage: from sage.ext.memory import init_memory_functions
sage: init_memory_functions()