Truncate SQL query text in index page

Large queries make the table hard to navigate.
Add DirectoryLister interface
Change ErrorCode to a concrete class, to allow it to be json serialized
Refactor failure handling

Split FailureInfo into ExecutionFailureInfo and FailureInfo, so that error codes can be propagated back from workers