red-brick: Fix API callback deregistration

Use a cookie to identify callback registrations and to specify which
registration to deregister. Also add a lock because thwe callback
(de)registration can happen from different threads.
red-brick/npw: Generalize subtitle generation
red-brick: Remove some unnecessary unicode casts
red-brick/pi: Set language part of group box title
red-brick/npw: Fix tab order and list widget expansion on C and Delphi pages
red-brick/npw: Ensure that all directories are relative