Turn test and build scripts into Makefile targets

Turn run-tests.sh, run-selenium-tests.sh and build.sh into Makefile targets. The scripts are still there for compatibility, but now they just call "make <appropriate-target>".

As an extra, the "clean" target has improved.