app/testpmd: move MAC swap functions