use #' where appropriate

The reader macro `#'foo` translates to `(function foo)` which is like
`(quote foo)` but preferred for functions.  According to its
documentation, in byte compilation, `function` causes its argument to be
compiled.