Change contracts to allow user_id with type long().

Also, add testing for long user_id.
This change is in response to contract failures happening on devstack development due to "long" user_ids.