Changed the functionality of hooks for secondary outputs

Now they are not required in the general settings but in each of the specified secondary outputs. This allows to separate the code for each secondary output and helps in better organization and management of code in cases where we have a lot of secondary outputs.

For now I can't find a way to execute the hooks from inside the secondary outputs list in a cleaner way, so I used the execute_hook_expression method instead. Maybe you could help me with a more elegant solution...