Fix for missing Freestyle sections in the Blender Python API documentation.

Freestyle sections of the API docs were empty due to Freestyle module reorganization
in commit rB6498b96ce7081db039354228213d72e8c70bd3aa.

Module __all__ property was added to submodules so as to properly exclude irrelevant
documentation elements such as mathutils.Vector.
Fix for a run-time error in sphinx_doc_gen.py on Windows.
Cleanup: use static sets where possible
Palettes:

Avoid having an invalid active index if user deletes a color.

Also attempt to set active color on clicking (Not working yet but fix
coming soon)
Palettes

* Remove some duplication in deletion code
* Fix crash when restoring file from last saved state.
Palette active color:

Use indicator color derived from color luminance for better contrast.
Fix T41708, active palette indicator not refreshing when clicking

Issue, after a lot of blood sweat and tears, was found in
ui_but_update_from_old_block, where we restore a button to its old
values when possible. The problem here is that a1 and a2 are not really
meant to store temporary variables, because they tend to get overriden
and palette selection is one of those temporary states.

Instead, we now store the position of each button in the palette in a2
and pointer to the palette in the customdata pointer of each button and
use that to test if it's active. The positions won't change when
clicking so we are guaranteed that the old button won't override the new
one with garbage.

It's still hacky but it is better than testing button types when copying
old values.
One last tweak to palette deletion code. It would correct active color
only when deleting the last color.
Fix crashes with timers.

Incorrectly accessing the menu pointer, set it to NULL before doing the
tests.

We don't restore the menu pointer because it is invalid by the time the operator ends.
Cleanup: set var static
Cleanup: de-duplicate text select logic
Cleanup: bool
Cleanup: use float versions of functions when in/output are floats
Cleanup: use const for read-only arrays