windows: Fix setting permissions in grant_process_token_dacl_permissions()
Rewrite function to always add a new allow granting permissions at first
position in DACL. Normally all deny permissions are before allow
permissions, so previously allow permission could have been overridden by
explicit deny permission. With this change, our newly added allow
permission override any possible deny permission and always grant access
for asked process user.
Also properly handle automatic inheritance model which is in use since
Windows 2000 and handle also special case when DACL is not present which
gives allow access to everyone.