run iptest in Dockerfile

and fix the one test that failed, due to docker running the tests as root

plus some minor Dockerfile cleanup and optimizations

helps ensure that a successful build doesn't include a broken IPython