Query support in portable libraries: CodePlex, https://aspnetwebstack.codeplex.com/workitem/1305

Description: Add query support in portable library,
the original support was missing because the namevaluepair
class does not exist in the portable version of .NET

This fix attempts re-use the same files and tests.