introduce getPortOIFOptions()

* getPortOIFOptions(): new function, although just a wrapper for
  readChapter() right now
* renderOIFCompatEditor(): update
* renderAutoPortsForm(): update
* renderIIFOIFCompatEditor(): update
move port OIFs from dictionary to a separate table

Port outer interfaces don't actually belong to the dictionary, the
reason for keeping that data there was to reuse the infrastructure.
However, with tableHandler() implemented that becomes less important
than missing foreign keys.

This change removes dictionary chapter 2, moves the outer interfaces
rows to a table of their own, much like the inner interfaces, and adds 3
new foreign keys that reference the new table.

* fetchPortList(): fetch data from PortOuterInterface instead of
  Dictionary
* getPortOIFCompat(): idem
* getPortInterfaceCompat(): idem
* getExistingPortTypeOptions(): idem
* getPortOIFOptions(): idem
* getPortIIFStats(): idem
* renderDataIntegrityReport(): idem and remove checks that duplicate the
  new foreign keys and update the foreign keys list
* getChapterRefc(): move POI-specific query to a new function
* getPortOIFRefc(): the new function
* dictionary.php: remove the contents of chapter 2
* functions.php: remove CHAP_PORTTYPE constant
* install.php: make the changes to schema
* upgrade.php: idem and add a section for 0.20.8
* renderPortOIFViewer(): new function
* renderPortOIFEditor(): new function
* navigation.php: register new page for POI management
* ophandlers.php: update $opspec_list for PortOuterInterface

Conflicts:
	wwwroot/inc/upgrade.php
fixup charset and collation in PortOuterInterface
syncdomain: use flock, not file existence

There were cases when syncdomain was terminated abnormally, keeping the
lock file existing. After that the syncdomain was not able to resume
until the lockfile was deleted.

This patch uses flock(), adds ability to disable locking logic
(--nolock), and to print significant errors to the STDERR (--stderr) to inform
sysadmin using mail.
SNMP support for Cisco 2960X-24PS-L, 2960X-24PD-L

Conflicts:
	ChangeLog
API to retrieve the newly created entity ID

When you implement a plugin that need to process the newly created
entity (by chaining after the original ophandler), you need to know the
entity id. lastInsertID() is not a choise since there may be multiple
inserts to different tables in the original ophandler.

lastCreated: new function to track or return the last created IDs
getLastCreatedId: wrapper around lastCreated(), filtering the last
created ID of a given realm.

these functions changed to call lastCreated():
	commitAddObject
	commitAddPort
	commitCreateUserAccount
	createIPv4Prefix
	createIPv6Prefix
	addVService
	addVSG
	createVLANDomain
	addRStoRSPool
	commitCreateRSPool
	tableHandler
callScript: export child resourse via global var

The proc_open resulting resource may be needed outside the callScript()
function if a user has signal handlers. E.g., a user may want to limit
the execution time of a gateway scipt using the pcntl_alarm(). In that
case the child process may need to be terminated explicitly using the
$script_child_res global resource.
callScript: wrong exit code bugfix
add a couple new Pica8 switches
new {$client_x.x.x.x} auto tag

Conflicts:
	ChangeLog
Update dictionary.php
update Juniper EX switches in dictionary

Added some missing Juniper EX4200 series switches to dictionary. Removed
space in model entity from existing EX series switches IAW Juniper's
naming standard.
Add items to dictionary
Fixed indent and id number
add .gitattributes for git-archive
add some Dell switches
improve handling of image generation errors

Adjust the code flow to make the right use of exceptions: whether there
is an image generation error, instead of deciding what to do define
exactly what happened and leave the actions up to the exception handler.

* exceptions.php: introduce RTImageError exception class, make the
  inline images constants and add new images
* index.php: make sure an image exception is always an RTImageError
* renderErrorImage(): deprecate
* renderAccessDeniedImage(): deprecate
* renderProgressBarError(): deprecate
* castRackImageException(): new function, an exception class convertor
* createTrueColorOrThrow(): new function, a PHP-GD error detector
* dispatchImageRequest(): don't do any local dispatching, convert
  exceptions to RTImageError where it makes sense
* printRackThumbImage(): use createTrueColorOrThrow()
* renderProgressBarImage(): ditto, throw only RTImageError
* renderProgressBar4Image(): ditto
update copyright years
trim argument of l2addressForDatabase() (#1215)
adjust icons in renderEditAttributesForm()