On the rational approximations to the powers of an algebraic number: solution of two problems of Mahler and Mendès France