The CW show, which is ending after four seasons, gave new life to a genre that was losing ground on the small screen.