luci-base: cbi: atomically reorder uci sections
luci-base: cbi: atomically reorder uci sections

Since the switch to ubus uci operations we do not have a local application-
side cursor cache anymore, instead uci operations happen synchronously in
the rpcd backend server.

This may cause cbi section reorder operations involving multiple elements
to fail, because anonymous section hashes may change due to rehashing
between consecutive ubus uci reorder calls.

In order to avoid that problem, use the ubus uci batch reorder extension,
which allows to pass a complete (or partial) list of section ids in the
desired order in one call, bypassing the volatile section id problem.

Fixes #1844.
Signed-off-by: Jo-Philipp Wich <bd73d35759d75cc215150d1bbc94f1b1078bee01@mein.io>

rogerpueyo/luci,nmav/luci,tobiaswaldvogel/luci,rogerpueyo/luci,openwrt/luci,hnyman/luci,Noltari/luci,wongsyrone/luci-1,openwrt/luci,tobiaswaldvogel/luci,kuoruan/lede-luci,kuoruan/luci,Noltari/luci,Noltari/luci,kuoruan/lede-luci,lbthomsen/openwrt-luci,kuoruan/lede-luci,openwrt-es/openwrt-luci,nmav/luci,rogerpueyo/luci,kuoruan/luci,chris5560/openwrt-luci,rogerpueyo/luci,nmav/luci,wongsyrone/luci-1,rogerpueyo/luci,rogerpueyo/luci,openwrt-es/openwrt-luci,lbthomsen/openwrt-luci,hnyman/luci,openwrt-es/openwrt-luci,openwrt-es/openwrt-luci,Noltari/luci,rogerpueyo/luci,Noltari/luci,kuoruan/luci,tobiaswaldvogel/luci,chris5560/openwrt-luci,Noltari/luci,tobiaswaldvogel/luci,nmav/luci,artynet/luci,lbthomsen/openwrt-luci,kuoruan/lede-luci,tobiaswaldvogel/luci,Noltari/luci,nmav/luci,artynet/luci,openwrt/luci,hnyman/luci,artynet/luci,kuoruan/lede-luci,wongsyrone/luci-1,hnyman/luci,artynet/luci,wongsyrone/luci-1,nmav/luci,wongsyrone/luci-1,kuoruan/lede-luci,chris5560/openwrt-luci,Noltari/luci,kuoruan/luci,lbthomsen/openwrt-luci,wongsyrone/luci-1,hnyman/luci,nmav/luci,hnyman/luci,openwrt/luci,chris5560/openwrt-luci,openwrt-es/openwrt-luci,rogerpueyo/luci,nmav/luci,lbthomsen/openwrt-luci,artynet/luci,openwrt/luci,hnyman/luci,chris5560/openwrt-luci,openwrt-es/openwrt-luci,Noltari/luci,openwrt/luci,wongsyrone/luci-1,lbthomsen/openwrt-luci,artynet/luci,chris5560/openwrt-luci,tobiaswaldvogel/luci,kuoruan/lede-luci,hnyman/luci,openwrt/luci,wongsyrone/luci-1,nmav/luci,artynet/luci,kuoruan/luci,kuoruan/luci,kuoruan/luci,kuoruan/lede-luci,chris5560/openwrt-luci,artynet/luci,kuoruan/luci,lbthomsen/openwrt-luci,tobiaswaldvogel/luci,openwrt-es/openwrt-luci,openwrt/luci,chris5560/openwrt-luci,artynet/luci,lbthomsen/openwrt-luci,tobiaswaldvogel/luci,openwrt-es/openwrt-luci