Change API of app pool hook allowing to call a single generic method

This should reduce the amount of duplicated code.
Remove option to change permissions on .samba4

Ticket:	#4174