A Coast Guard recruiting office in Virginia was damaged by apparent gunfire overnight, and authorities said on Tuesday they were investigating whether the incident was related to a recent spate of shootings at other military buildings close to the capital.