Planning and Learning with Adaptive Lookahead