Colloidal quantum dot based solar cells: from materials to devices