Terry Devlin's double denied Swansea the chance to take top spot in the Championship as in-form Portsmouth won 3-1 at Fratton Park.