AP Source: Douglas agrees to terms with Dolphins