Electron capture by HCl trimers: an ab initio study