Refactored yql into an external library.

Refactored yql into an external library.  Updated all of the appropriate
internal code.