Added some new templates, and improved the others.

All functions (besides the riak_core ones) should have the -spec of every
function predone. It can be modified to be more specific as needed by the app
developer.