python: Allow --with-brewed-tk and fix PYTHONFRAMEWORKDIR

Fixes #16574

I reordered the formula such that the options come first and then the depends_on. I think it is more logical now, since some `depends_on` are conditional on the given options.