Feature Request: Allow associating the user with the client-side currentVisit

In the Rails version, there's an authenticate method that allows a user to be associated with a visit. After authenticating that user is automatically associated with that Visit and all subsequent events
Basically the issue is that in Event, we'd like to pass user_id to the top level of the method call, but we can only pass additional attributes into the properties dictionary (which is one level too deep for user_id to be used in the api)
Thanks for the request and explanation @jrbj!
I've put together a PR which I believe addresses your situation, but I'd like to make sure I understand it correctly. Are you looking to ensure user_id appears in each event payload as I've done in that PR or did I misunderstand your needs?
Completed via #2