The tragic explosion of a gas pipeline in a San Francisco suburb has shed light on a problem usually kept underground: Communities have expanded over pipes built decades earlier when no one lived there.