Capture whence information in all Serval logging API entry points.
Introduce the LogLevel enum type to avoid exposing internal C API
details in the Swift API.
Rename Swift API methods and types to use camelCase naming style, to
distinguish it from the C API, which uses under_score naming style.
The iOS build now produces two frameworks instead of one:
- 'serval_dna' is the C API
- 'ServalDNA' is the Swift API (daemon)
The top-level modulemap file now produces a C API module called
'serval_dna' (renamed the library to libserval_dna.a) so that the Swift
API code can be identical for iOS and non-iOS targets.
On iOS, the log outputter uses Apple's Unified Logging System, but on
Mac OS, the logger uses the older Syslog API so that it will compile on
platforms older than macOS 10.13 High Sierra.
The daemon API is built as a Swift module called ServalDNA.
The new CliContext class allows easy implementation of CLI output using
Swift code. The new CliContextFile subclass is the obvious first
implementation, equivalent to cli_stdio.c. The 'servaldswift'
executable now uses CliContextFile to print its CLI output to standard
output.
The new delegated log output support constructs each log line in a
buffer and prints it by calling the delegate's 'print' function at
end-of-line. The 'servaldswift' executable now provides a log output
delegate in Swift that simply prints to standard error, replacing
log_output_console.o, which is omitted from its link.