Private renters stuck in dangerous homes ‘failed’ by councils