Long range van der Waals density functional: Dimers involving alkali-metal, alkaline-earth-metal, and noble-gas atoms