htools: rewrite Cluster.filterMGResults
htools: rewrite Cluster.filterMGResults

filterMGResults was built using a sequence of map and filter calls;
while this was logically correct, it used some incomplete pattern
matching which with the new GHC 7 triggers a warning.

The patch rewrites it using a single foldl that does both the filtering
and the mapping, in a more type-safe way.

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Guido Trotter <f62ca4d5358bdaeef0e50e57f9f7e231de63727e@google.com>

ganeti/ganeti,apyrgio/ganeti,leshchevds/ganeti,leshchevds/ganeti,grnet/snf-ganeti,apyrgio/snf-ganeti,yiannist/ganeti,mbakke/ganeti,andir/ganeti,grnet/snf-ganeti,apyrgio/snf-ganeti,onponomarev/ganeti,mbakke/ganeti,onponomarev/ganeti,ganeti/ganeti,mbakke/ganeti,andir/ganeti,dimara/ganeti,bitemyapp/ganeti,yiannist/ganeti,bitemyapp/ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,andir/ganeti,apyrgio/ganeti,leshchevds/ganeti,ganeti/ganeti,yiannist/ganeti,ganeti-github-testing/ganeti-test-1