use consistent types for IDs

In model objects, all IDs are of type Long. They should be the same also in ApiClient class (otherwise it is very inconvenient to use the API).

I've left the old implementations also in place (deprecated).