Density functional theory for planar electric double layers: closing the gap between simple and polyelectrolytes.