FLINT fmpq_poly compatibility helpers

This module implements functions that were removed from FLINT but are still needed by Sage. The code is adapted from earlier versions of FLINT.