Massless black holes and black rings as effective geometries of the D1–D5 system