HDFS Viewer displays "error: null" when permission is denied

### The root cause:

 1. When the HdfsBrowserServlet tries to view a file, it calls getCapabilities() for each of the viewers to determine 1) whether the viewer can read the file and 2) whether there is a schema available for the file.
 2. AvroFileViewer.getCapabilities() calls AvroFileViewer.getAvroDataStream() to attempt to open the file to determine whether it could read it.
 3. In getAvroDataStream, there is a bug where the catch block for hdfsInputStream = fs.open(path); does not return or throw the exception. As a result, when this call to open fails due to an AccessControlException being thrown, it still falls through to code later in the method, which tries to use the InputStream, resulting in a NullPointerException.
 4. The NullPointerException is then propagated back up, all the way until when it is caught by handleGet, which displays an error page with a null message.

### The main changes:

 * Clean up HdfsBrowserServlet and improve its error handling.
 * Fix a NullPointerException in AvroFileViewer.getCapabilities, which was causing the origin "Error: null".
 * Make it possible for HdfsFileViewer.getCapabilities to throw an AccessControlException to detect if a user has no permissions to read a file.
 * My editor strips trailing whitespace.

Tracked by internal Jira: HADOOP-4495