Make multimethods work as component functions.

This is actually a bug in ClojureScript
(http://dev.clojure.org/jira/browse/CLJS-777).  In regular Clojure a
`MultiFn` is `ifn?`, but in ClojureScript it wasn't.  The bug is now
fixed
(https://github.com/clojure/clojurescript/commit/525154f2a4874cf3b88ac3d5755794de425a94cb)
but not yet released.

This code can be reverted after Reagent's ClojureScript version is
updated.
core/memoize is very slow, so use our own instead
Use nth throughout for consistency
Simplify rendering of wrapped components
Use new memoize everywhere