Bring over locking changes applied to udp_output() for the route cache in r297225
and fixed in r306559 which achieve multiple things:
(1) acquire an exclusive inp lock earlier depending on the expected conditions; we add a comment explaining this in udp6,
(2) having acquired the exclusive lock earlier eliminates a slight possible chance for a race condition which was present in v4 for multiple years as well and is now gone, and
(3) only pass the inp_route6 to ip6_output() if we are holding an exclusive inp lock, so possible route cache updates in case of routing table generation number changes can happen savely.
In addition this change (as the legacy IP counterpart) decomposes the tracking
of inp and pcbinfo lock and adds extra assertions, that the two together are
Pointyhat to: bz (for completely missing this bit)