Refactor all connection_*_list_*() to use CONN_GET_ALL_TEMPLATE

legacy/trac#17242 (moved) will introduce the CONN_GET_ALL_TEMPLATE() macro which could benefit a bunch of function to use.