On the ergodic and the adaptive control of stochastic differential delay systems