Machine-learning algorithm analyzes gravitational waves from merging neutron stars in the blink of an eye