code: Fix the binary detection for file's contents

* Server does
    * Decide whether the file is binary or not.
    * Decide the file's mimetype using Tika.
    * If the file is larger than MAX_FILE_SIZE_CAN_BE_VIEWED, does not
      send its contents.
* Then client does
    * If the contents is empty but the size is larger than zero, client
      treat it as a binary file so show a link to downloda the file.
    * If the file is not binary, client show the file as image if the
      mimetype matches with "image/*" else show a link to download the
      file.
    * If the file is binary, client show the file as source code and
      apply syntax highlight by its language. The language is often
      specified by the server in the subtype of the mimetype; If not the
      client decides it by the file's extension.