add DATAROOTDIR to build_h.jl, use it in Base.runtests()

fixes #8368 @nalimilan
Fair. I'll play with it, see how it looks. Was trying to keep the backporting considerations in mind here.