scripts/test: revert to using g++-14
It seems `g++-loongarch64-linux-gnu` does not exist in the Ubuntu
universe repositories. It also fails using the ubuntu Docker image
locally (with the universe repo added).
`g++-14-loongarch-linux-gnu` exists on both Ubuntu 22.04 and 24.04,
however ideally we want to use whatever works on the most platforms.