Three firefighters were injured when a natural gas leak caused an explosion and fire at a New Hampshire mental health center, but the building’s tenants and clients all evacuated safely.