mp_integer: complete the implementation of the specialisation of safe_cast,
including doc and testing.