Peverley signs three-year deal with Bruins