Fix #2257 - Improve custom select event robustness

Custom form selects use .prev() to find the underlying select field.
This breaks with plugins like jQuery Validate that insert content between
the underlying select element and the custom markup element. This patch
uses prevAll('select').first() to select the closest previous sibling
element to improve the robustness of this functionality.
Remove jQuery dependency for custom select improvement

Added a utility function to replace prevAll(selector)
Merge pull request #2267 from mhchen/custom-select-compatability

Fix #2257 - Improve custom select event robustness