[#1384] Make the database query in related_list

* We didn't actually do the database query in related_list if we
  didn't pass a dataset. This commit fixes that.
* Share the dictize function for both cases.
[3184] related_list fixes
[1384] related_list fixes
[#1384] Update documentation for related_list

The related_list function should not need an id or dataset
parameter. We use it ourselves in the related dashboard
without an id or dataset parameter.
[#1384] Remove sorted from model_dictize

related_items is already sorted from the database query.
Adding another sorting at the model_dictize level looks
unnecessary and overrides the one from the query.
[#1384] Fix test broken due to sorted change

* Fix the test broken because it expects results from sorted.
* Correct the PEP8 change in related controller.