Implement the discovery API

/to @bajtos @raymondfeng 

This adds discovery support to the workspace. The methods are not remoted yet, but that will come in a PR that adds remoting to all custom methods.

I'm not sure about how this is currently tested, since it uses a mock data source. But I'm also not convinced yet that taking on the burden of running actual end to end discovery would make sense either. Any suggestions here would be helpful.


Added the test back in.