Ensure ids of resulting records are integers.

Ensure ids of resulting records are integers.
Move List#id into the public API.
Fix code examples.
Add test for BasicSet#ids method.
Add documentation to BasicSet#ids.