Former 49ers DE Randy Gregory signs with the Buccaneers