accounts: more query support, --flat/--drop/--depth support