Webclient: refactor type menus (#529).

Creation of the type list is decoupled from creating the menu.

In preparation of "Rightclick in empty canvas should open create menu on canvas" (see #529).

DEVELOPER NOTES

Webclient API:
- `dm4c.type_cache.get_topic_types(filter_func)` is a new method.
- `dm4c.topic_type_list()` is a new method. It returns a list of all the topic types the current user is enabled to create instances of.

BREAKING CHANGES

- `dm4c.type_cache.iterate()` is no longer a public method. Use `get_topic_types()` instead (see above).
- `dm4c.refresh_type_menu()` has changed signature: the optional 2nd paramter is an array of topic types (instead a filter function)