factor array_fetch() out

There is no core function in PHP that would return a default value when
there is no requested index in the array (consider Array.fetch() in
Ruby). Implement and use such function to replace a few ternary
conditionals with a more focused notation.

* array_fetch(): new function
* syncdomain.php: update
* getPrevIDforRack(): idem
* getNextIDforRack(): idem
* formatRealmName(): idem
* get8021QSyncOptions(): idem
* strerror8021Q(): idem
* renderObject8021QPorts(): idem
* renderObject8021QSyncPorts(): idem
* resolve8021QConflicts(): idem
* tableHandler(): idem