California firefighters are making progress against a wall of flames north of Sacramento, which forced thousands to leave their homes.