SANTA CLARA The 49ers signed free-agent linebacker David Mayo to a two-year contract on Thursday.Mayo, 25, played the first four seasons of his NFL career