Magnetoresistance and quantum oscillations of an electrostatically tuned semimetal-to-metal transition in ultrathin WTe 2