java: fill in stat structure correctly

Added stat filling helper function but only stat and lstat were updated.
This patch makes fstat use it. Crucially the fstat wasn't updating the
mode flags.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Merge pull request #2787 from ceph/fix-fstat-mode

java: fill in stat structure correctly

Reviewed-by: Sage Weil <sage@redhat.com>