general cleanup + comments

* iif curried to arity 3 - accepts n-number of values to apply to guard / left / right
* adding missing var keyword in database.js
* thk to cnst, for clarity
* combining underscore and 'functional' lib into __ to reduce noise