Added collection.js

Largely based off backbone's implementation. Will refine with future
commits.