Alex Hales has signed a new three-year contract with Nottinghamshire after being given permission to play in the Indian Premier League.