Added more helper functions, rearranged code.

Miscellaneous minor house-cleaning as I embarked on
deeply frustrating bug-hunt.
Edited pilot testing intro for clarity and style.

Gonna read Gallistel 2009 now and then return to editing the pilot
test results section.
Still plenty to do with section on primary study outcomes.
Might need more edits once I merge Jeff's edits to 'Bayesian Inference'
Many edits to sections 2 and 3, lots of BibTeX...
Finished editing sections 2, 3, and discussion.
-Ready to merge this branch with Jeff's edits.
Merged Jeff's and Joe's edits.
- Ready for reading by co-authors?