file: Use 'long' to represent the parsed LOCK TIMEOUT value

Convert the StringToInt helper into a StringToLong helper with a 'long'
result type.  This will make the helper more useful to other callers
that want to use strtol.

While at it, also check errno after calling strtol in case the
conversion fails with a range error.
Merge topic 'file-LOCK-timeout-type' into next

97841dad file: Use 'long' to represent the parsed LOCK TIMEOUT value