Merge -c 1583241 from trunk to branch-2 to fix HDFS-4564. Ensure webhdfs returns correct HTTP response codes for denied operations. Contributed by Daryn Sharp.