Boeing's Starliner spacecraft has returned early after a timing error meant it failed to dock with the International Space Station.