Add security to Riak

This PR uses the new security APIs in riak_core to do permissions checking on various riak API endpoints.

It currently does not secure ALL of the APIs, specifically stats, link walking and the 'CS bucket' APIs are not covered.

See also basho/riak#355