Make get_by_id type-agnostic.

Make sure that calls to get_by_id can deal with both str and numeric
id's. For these providers '1' is considered to be the same as 1.
Doc experiments.
Add some support for collections.
Fix some flake8 errors and warnings.