luci-base: ensure that base url is emitted with trailing slash
luci-base: ensure that base url is emitted with trailing slash

Now that we don't have an url token anymore, '/cgi-bin/luci' becomes a valid
url while cookies are restricted to only '/cgi-bin/luci/' and below.

In order to ensure that the first request after login refers to a path
covered by the authentication cookie, change build_url() to always append
a trailing slash if we're referring to the base url.

This should fix the login problems mentioned in #516.

While we're touching the dispatcher, also remove remaining url token code.

Signed-off-by: Jo-Philipp Wich <a9275913d515487ffaed469337a530ed202da558@openwrt.org>

teslamint/luci,daofeng2015/luci,artynet/luci,openwrt-es/openwrt-luci,aa65535/luci,kuoruan/lede-luci,LuttyYang/luci,artynet/luci,jlopenwrtluci/luci,kuoruan/luci,maxrio/luci981213,daofeng2015/luci,tobiaswaldvogel/luci,artynet/luci,oneru/luci,taiha/luci,taiha/luci,Wedmer/luci,taiha/luci,LuttyYang/luci,Wedmer/luci,Wedmer/luci,aa65535/luci,openwrt-es/openwrt-luci,hnyman/luci,LuttyYang/luci,cappiewu/luci,shangjiyu/luci-with-extra,bittorf/luci,nmav/luci,Hostle/luci,NeoRaider/luci,remakeelectric/luci,tobiaswaldvogel/luci,teslamint/luci,lbthomsen/openwrt-luci,kuoruan/lede-luci,daofeng2015/luci,tobiaswaldvogel/luci,LuttyYang/luci,lbthomsen/openwrt-luci,jlopenwrtluci/luci,shangjiyu/luci-with-extra,wongsyrone/luci-1,Noltari/luci,nmav/luci,rogerpueyo/luci,artynet/luci,maxrio/luci981213,nmav/luci,cshore-firmware/openwrt-luci,wongsyrone/luci-1,wongsyrone/luci-1,thess/OpenWrt-luci,kuoruan/luci,openwrt-es/openwrt-luci,cshore-firmware/openwrt-luci,openwrt/luci,lbthomsen/openwrt-luci,openwrt/luci,maxrio/luci981213,bright-things/ionic-luci,bright-things/ionic-luci,wongsyrone/luci-1,ollie27/openwrt_luci,cshore/luci,NeoRaider/luci,ollie27/openwrt_luci,mumuqz/luci,kuoruan/lede-luci,thess/OpenWrt-luci,chris5560/openwrt-luci,shangjiyu/luci-with-extra,openwrt-es/openwrt-luci,tobiaswaldvogel/luci,openwrt/luci,urueedi/luci,bittorf/luci,openwrt-es/openwrt-luci,remakeelectric/luci,openwrt-es/openwrt-luci,urueedi/luci,remakeelectric/luci,cshore/luci,cappiewu/luci,jlopenwrtluci/luci,thess/OpenWrt-luci,cshore/luci,nmav/luci,oneru/luci,thess/OpenWrt-luci,mumuqz/luci,kuoruan/luci,taiha/luci,mumuqz/luci,bittorf/luci,jlopenwrtluci/luci,mumuqz/luci,shangjiyu/luci-with-extra,bittorf/luci,Wedmer/luci,oneru/luci,artynet/luci,shangjiyu/luci-with-extra,NeoRaider/luci,maxrio/luci981213,wongsyrone/luci-1,taiha/luci,LuttyYang/luci,bright-things/ionic-luci,hnyman/luci,cshore/luci,openwrt/luci,lbthomsen/openwrt-luci,aa65535/luci,rogerpueyo/luci,oneru/luci,thess/OpenWrt-luci,shangjiyu/luci-with-extra,Hostle/luci,NeoRaider/luci,chris5560/openwrt-luci,Hostle/luci,chris5560/openwrt-luci,openwrt-es/openwrt-luci,981213/luci-1,kuoruan/lede-luci,nmav/luci,thess/OpenWrt-luci,hnyman/luci,remakeelectric/luci,lbthomsen/openwrt-luci,maxrio/luci981213,LuttyYang/luci,openwrt/luci,Wedmer/luci,mumuqz/luci,teslamint/luci,lbthomsen/openwrt-luci,rogerpueyo/luci,Noltari/luci,Wedmer/luci,taiha/luci,ollie27/openwrt_luci,cappiewu/luci,bittorf/luci,bittorf/luci,oneru/luci,chris5560/openwrt-luci,bright-things/ionic-luci,wongsyrone/luci-1,NeoRaider/luci,981213/luci-1,jlopenwrtluci/luci,aa65535/luci,artynet/luci,aa65535/luci,cappiewu/luci,LuttyYang/luci,Hostle/luci,NeoRaider/luci,mumuqz/luci,rogerpueyo/luci,chris5560/openwrt-luci,tobiaswaldvogel/luci,kuoruan/lede-luci,cshore-firmware/openwrt-luci,kuoruan/luci,mumuqz/luci,wongsyrone/luci-1,tobiaswaldvogel/luci,981213/luci-1,cappiewu/luci,ollie27/openwrt_luci,Hostle/luci,hnyman/luci,daofeng2015/luci,lbthomsen/openwrt-luci,artynet/luci,981213/luci-1,ollie27/openwrt_luci,NeoRaider/luci,cshore-firmware/openwrt-luci,ollie27/openwrt_luci,thess/OpenWrt-luci,hnyman/luci,urueedi/luci,taiha/luci,cshore/luci,cshore-firmware/openwrt-luci,rogerpueyo/luci,cshore-firmware/openwrt-luci,daofeng2015/luci,shangjiyu/luci-with-extra,kuoruan/lede-luci,chris5560/openwrt-luci,cappiewu/luci,Noltari/luci,rogerpueyo/luci,artynet/luci,Noltari/luci,nmav/luci,remakeelectric/luci,Noltari/luci,chris5560/openwrt-luci,bright-things/ionic-luci,oneru/luci,chris5560/openwrt-luci,Hostle/luci,cappiewu/luci,981213/luci-1,Hostle/luci,aa65535/luci,thess/OpenWrt-luci,cshore-firmware/openwrt-luci,hnyman/luci,bittorf/luci,maxrio/luci981213,remakeelectric/luci,cshore/luci,openwrt/luci,Wedmer/luci,rogerpueyo/luci,urueedi/luci,Noltari/luci,LuttyYang/luci,Noltari/luci,maxrio/luci981213,aa65535/luci,Noltari/luci,teslamint/luci,kuoruan/luci,bright-things/ionic-luci,981213/luci-1,jlopenwrtluci/luci,wongsyrone/luci-1,Wedmer/luci,urueedi/luci,openwrt-es/openwrt-luci,teslamint/luci,cshore-firmware/openwrt-luci,jlopenwrtluci/luci,cappiewu/luci,nmav/luci,Hostle/luci,daofeng2015/luci,tobiaswaldvogel/luci,remakeelectric/luci,shangjiyu/luci-with-extra,urueedi/luci,kuoruan/luci,kuoruan/luci,nmav/luci,ollie27/openwrt_luci,981213/luci-1,urueedi/luci,ollie27/openwrt_luci,kuoruan/luci,NeoRaider/luci,kuoruan/lede-luci,maxrio/luci981213,remakeelectric/luci,rogerpueyo/luci,jlopenwrtluci/luci,teslamint/luci,urueedi/luci,hnyman/luci,artynet/luci,mumuqz/luci,openwrt/luci,teslamint/luci,oneru/luci,cshore/luci,cshore/luci,openwrt/luci,hnyman/luci,oneru/luci,kuoruan/lede-luci,taiha/luci,tobiaswaldvogel/luci,bittorf/luci,bright-things/ionic-luci,lbthomsen/openwrt-luci,daofeng2015/luci,bright-things/ionic-luci,Noltari/luci,aa65535/luci,nmav/luci,teslamint/luci,daofeng2015/luci