* fileio.c (Finsert_file_contents): Simplify new diagnostic

and make it more consistent with other stat-failure diagnostics.
Work around bug in CIFS and vboxsf file systems.

The bug was observed on Ubuntu operating inside a virtual machine,
editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
The workaround introduces a race condition on non-buggy hosts,
but it's an unlikely race and anyway there's a nearly identical
nearby race that can't be fixed.
* fileio.c (valid_timestamp_file_system, timestamp_file_system):
New static vars.
(Fwrite_region): Test for file system time stamp bug.
(init_fileio): New function.
* lisp.h (init_fileio): Declare it.
* emacs.c (main): Call it.
Minor fix in acl_set_file.

 src/w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
 set_file_security as failure due to insufficient privileges.
 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
Make 'fstat' on MS-Windows behave more like 'stat' and 'lstat'.

 src/w32.c (fstat): Return owner and group like 'stat' and 'lstat' do.
* emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid aborting on Fsignal.
Allow floating-point file offsets.

Problem reported by Vitalie Spinu in
<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
* doc/lispref/files.texi (Reading from Files, Writing to Files):
Say that file offsets can be numbers, not just integers.
* src/fileio.c (emacs_lseek): Remove.
(file_offset): New function.
(Finsert_file_contents, Fwrite_region): Use it.
* image-mode.el (image-mode-fit-frame): Add a frame argument.
Suggested by Drew Adams.  Handle window decorations;
save and restore the old window configuration.
* fileio.c (Fwrite_region): Sync diagnostic to previous change.
Fix size bug on DOS_NT introduced by CIFS workaround.

* fileio.c (Fwrite_region): Use O_BINARY in checking code, too.