Move authz methods to library
Merge remote-tracking branch 'upstream/master' into pump.jpope.org