fix(select): make ngOptions support selectAs and trackBy together

This commit implements a function, "getSelected()", that takes the
selectAs expression into account when determining if a particular
option is selected or not. Previously, the selectAs part of the
ngOptions comprehension expression was being ignored.

Fixes #6564
since there is only one implementation of this fn then just use function declaration of it and even move it up into a common closure (will require addition of selectAsFn as an argument, which is fine)