The developer that plans to build four towers in Portland’s Bayside neighborhood has agreed to substantially scale down the project, in a deal with an opposition group that had sued to stop it. The Federated Companies gave the city a plan Tuesday for four apartment buildings that would be less than half the height of those in the original plan, which the city approved in January. The previous plan called for four 14-story towers on Somerset Street.