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

fixes #8368 @nalimilan
Was more hesitant to mess around with `prefix` or `SYSCONFDIR`, that seems more likely to potentially break things. Who knows what's relying on the current behavior...