Completed querying for branches

- use NBExternalAddress consistently for char* arguments, looks like passing strings directly does not guarantee null termination- added generic #lookup: for reference names- added #lookupBranch: by name

Signed-off-by: Stefan Marr <git@stefan-marr.de>