Former Australian rugby league international Israel Folau has confirmed he is switching codes to union.