Inverness Caley skipper Richie Foran has signed a new three-year contract with the Scottish Premiership club.