Fix #13075. Optimize $.type by preferring `typeof`. Close gh-1089.

Also fixes browsers where `typeof RegExp === "function"`.
Followup to gh-1089. Avoid duplicate typeof check.
Remove createSafeFragment helper
Remove leading white space check
Remove tbody check
Remove removal of container children through removeChild method
Remove unused variables
Code style changes
Simplify jQuery#wrap
Code style changes
Change "isFunc" variable to "isFunction"
Remove memory fix
Simplify fixCloneNodeIssues helper
Simplify getAll helper
Remove fixDefaultChecked helper
Move all helpers to the end of the module
Simplify wrapMap
Simplify jQuery.expando
Use jQuery.merge only if it really necessary
Simplify execution of script element if it processed without src attribute