THRIFT-713. java: Java compareTo method throws NPE when any field isn't set. This patch fixes a somewhat egregious bug in the generated compareTo for non-union structs and avoids possible NPEs.