Define and use agent_url_base in entity. closes #2696

Conflicts:
	inc/config.class.php
	inc/menu.class.php
	inc/staticmisc.class.php