Export dimindex, dim indexes, and coords

Based on the discussion in #20, this patch exports ``coords``, ``dimindex`` and ``dimindexes`` (which were internal functions originally named ``named2coords``, ``named2dimension``, and ``named2dimindexes``).

There are also some minor cleanup of the implementation of these functions.