Determination of the Electronic Energy Levels of Colloidal Nanocrystals using Field-Effect Transistors and Ab-Initio Calculations