Fix reading 0 bytes after ungetting a character

Running getc, ungetc, followed by getc produces an incorrect answer.

Right now fread returns immediately if asked to read 0 bytes. This is likely because the node.js backend throws an error (which sets the error bit on the stream) if asked to read 0 bytes from a file.

This check in fread is insufficient because the number of bytes to be read can fall back to zero after dealing with ungetting characters. The example below shows this bug (place in /tmp and run).
The second printf should show the same character twice, but at the moment it will print garbage.

```c
#include <stdio.h>
int main() {
#ifdef EMSCRIPTEN
#include <emscripten.h>
  EM_ASM(FS.mount(NODEFS, { root: '/tmp' }, '/tmp'));
#endif
  FILE *f = fopen("/tmp/zerotest.c", "r");
  printf("f %p\n", f);
  int c = getc(f);
  ungetc(c, f);
  int d = getc(f);
  printf("'%c' '%c'\n", c, d);
  printf("'%zd'\n", fread(&c, 0, 0, f));
  printf("'%zd'\n", fread(&c, 1, 1, f));
  printf("'%c'\n", c);
  return 0;
}
```