Fix unneeded dependency on boost.signals when boost.signals2 is selected

Wt offers the option to use boost.signals2 as signals implementation, but always requests boost.signals as dependency, meaning that boost.signals must be built despite it not being used. This patch fixes said behavior by skipping the dependency if boost.signals2 is selected.

This required a little code shuffling, but appears to work well. I hope I did not miss anything - please make sure to test this with odd configurations before merging.