filedesc: fixup fdinit to lock fdp and preapare files conditinally

Not all consumers providing fdp to copy from want files.

Perhaps these functions should be reorganized to better express the outcome.

This fixes up panics after r273895 .

Reported by:	markj


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
﻿The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle.  Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by:	bz, kib
Pointy hat to:	dim
MFC after:	1 week
X-MFC-With:	r274442


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f