adoption of patchpanel branch (first part)

These changes address SQL performance, code reusage,
HTML interface markup and some bugs.
The 802.1Q, Live LLDP/CDP are not adopted and stay broken for now.

fetchPortsAndLinks:
	- SQL optimization
	- remote_object_name is a common name again, not a dname
	- new fields in linkinfo: 'is_l1' (bool) and 'remote_object_type' (int)
	- L2 links are placed in 'links' list before L1 (patchpanel links).
formatLinkedPort: fixed, use 'links' array
getPopupLink: new interface lib func. Generates HTML link to open a popup helper window
getOpFormIntro: byval-version of printOpFormIntro
renderEditObjectForm: use getPopupLink
renderObject: idem
renderNATv4ForObject: idem
renderObjectPortRow: refactored a bit, removed code duplication.
	Trace port link moved to ...-popup-menu (TODO: make this work not only for
	Ethernet ports, dont display trace link for non-linked ports)
renderPortsForObject: refactored a bit, removed code duplication.
	ug fixed: local port was renamed when non-first link's cable id was updated
switchportInfoJS: add 'trace' link to port popup menu