Revamped register_first()/ _last()

This is an update on this previous pull request https://github.com/boto/botocore/pull/299/files. I need it for some future features in the cli. I just rebased the original pull request on the head of the develop branch.

cc @jamesls @danielgtaylor