Mortgage companies across the spectrum are looking for ways to reduce expenses. Automation and artificial intelligence might be a solution.