lib/mem: removed read_file() and write_file()

SAFE_FILE_SCANF() and SAFE_FILE_PRINTF() can completely displace
read_file() and write_file(), so removed them.

Signed-off-by: Zhouping Liu <zliu@redhat.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>