core: ensure resource ids passed to the ACL are integers. This makes ACL modules simpler.
(cherry picked from commit dafc7cb05f3381afe91d5282ddd9c494f222789c)