Optimize account_lines and account_offers (RIPD-587)