Refactor internal Trust Client to support Android Trust GUI (#2158)