python: Allow --with-brewed-tk.

- Fixes #16574.
- Improve Tkinter test by actually calling Tk()
- Check for /Library/Frameworks/Tk.framework no longer needed.
- Fix PYTHONFRAMEWORKDIR so that `python-config --ldflags` is useful.

Closes #16626.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
sqlite: keg_only

Closes #17000.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
portmidi: Version 217, Java & Python optional.

- with-python: Proper Python bindings that ship with portmidi
- Fixes CMAKE_OSX_SYSROOT location

Note, JAVA SDK has to be installed separately on Macs,
therefore: opt-in!