The US has been rattled by two earthquakes, one striking the coast of Oregon and another hitting western Texas.