Fix record_input bug when file_parallelism is less than 0
Please squash the commits Thanks @mihaimaruseac  PR has been updated with commits squashed. Please take a look.
This PR tries to fix #59123 where file_parallelism <0 will
cause a crash in record_input.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>