Add assertions to cover all places in the wiring and unwiring code
where MAP_ENTRY_IN_TRANSITION is set or cleared.

Tested by:	pho
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Vm map code performs clipping when map entry covers region which is
larger than the operational region.  If the op region size is zero,
clipping would create a zero-sized map entry.  The result is that vm
map splay starts behaving inconsistently, sometimes returning
zero-sized entry, sometimes the next (or previous) entry.

One step further, it could result in e.g. vm_map_wire() setting
MAP_ENTRY_IN_TRANSITION on the zero-sized entry, but failing to clear
it in the done part.  The vm_map_delete() than hangs forever waiting
for the flag removal.

Verify for zero-length requests and act as if it is always successfull
without performing any action on the address space.

Diagnosed by:	pho
Tested by:	pho (previous version)
Reviewed by:	alc (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
3933 contract adoption can race

illumos/illumos-gate@a81df0a5d715363cc1841810a87818dfa95675c0

Note we now reference illumos commits in the github repository as the
mercurial mirror seems to be neglected.

For connectivity:
r255255 referenced 14164:dceb17481b99 which is
illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e

r255258 referenced 14176:15e9457c12ec which is
illumos/illumos-gate@cf746768a898264fa491791a8252865e5338dc67
3881 want device driver for HP SmartArray RAID controllers

illumos/illumos-gate@80c94ecd7a524eb933a4bb221a9618b9dc490e76
4091 e1000g I217/I218 support

illumos/illumos-gate@75eba5b6d79ed4d2ce3daf7b2806306b6b69a938
4101 metaslab_debug should allow for fine-grained control

4102 space_maps should store more information about themselves
4103 space map object blocksize should be increased
4104 ::spa_space no longer works
4105 removing a mirrored log device results in a leaked object
4106 asynchronously load metaslab

Revision illumos/illumos-gate@0713e232b7712cd27d99e1e935ebb8d5de61c57d
fix a screw up in r258371

Pointyhat to:	avg
4168 ztest assertion failure in dbuf_undirty

4169 verbatim import causes zdb to segfa
4170 zhack leaves pool in ACTIVE state

illumos/illumos-gate@7fdd916c474ea52896c671bbe7b56ba34a1ca132
4171 clean up spa_feature_*() interfaces

4172 implement extensible_dataset feature for use by other zpool
features

illumos/illumos-gate@2acef22db7808606888f8f92715629ff3ba555b9
4166 EOF pcata

4167 EOF pcser
2995 pcan and pcwl wifi device drivers EOL

illumos/illumos-gate@506aa7c68b127eefb0197e329af7e9abcc3ebc98
3964 L2ARC should always compress metadata buffers

illumos/illumos-gate@e4be62a2b74a8f09bb669217a1a39eee069b13a1
4088 use after free in arc_release()

illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772
4089 NULL pointer dereference in arc_read()

illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea
4248 dtrace(1M) should never create DOF with empty probes section

4249 Only probes from the first DTrace object file will be included

illumos/illumos-gate@54a20ab41aadcb81c53e72fc65886e964e9add59
4236 Internet Packet Disturber

4237 net_* and hook_* man pages are wrong

illumos/illumos-gate@fe77cc0407fb667ddc04e1a8f2e203bb7b9c80e1
3928 `tail -f ...` doesn't notice file truncation

3929 `man tail` doesn't mentioned "-F" option
3930 'tail -F ...' not resetting the offset of file rotation properly
3968 want FILE_TRUNC event for PORT_SOURCE_FILE

illumos/illumos-gate@72102e7461c97dc268d21d9dd8f02da45f174acd
4128 disks in zpools never go away when pulled

illumos/illumos-gate@39cddb10a31c1c2e66aed69e6871d09caa4c8147
4322 ZFS deadlock on dp_config_rwlock

illumos/illumos-gate@c50d56f667f119d78fa3d94d6bef2c298ba556f6
Split raw reading/programming into smaller chunks to avoid allocating too
big chunk of kernel memory. Validate size of data. Add error handling to
avoid calling copyout() when data has not been read correctly.

Reviewed by:    zbb
Reported by:    x90c <geinblues@gmail.com>
MFC after:      2 days
MFV r258377: 4088 use after free in arc_release()

illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772

MFC after:	5 days