Parse file from buffer only if the file isn't too big

By loading e.g. a huge DB dump into memory we could run out of memory.
Check the size of the file and determine whether to use file parsing
or buffer parsing.

Give up early if LANG_IGNORE set - there's no need to read the file in
this case.