Application::PostUserEvent returns a pointer dressed as sal_uLong

cherry picked from commit ce53796bfaf6df5c4415fda8f641cad8a3e144a6, plus more
cases from 93f5d5a9190e0e03bf4822663652a4b068c44f75: "The opaque PostUserEvent
IDs are actually pointers so declare them as such.  This avoids the recurring
mistake of storing such IDs as sal_uInt32, truncating in 64 bit environments,
causing RemoveUserEvent to potentially not remove the event, it thus firing 'too
late' and probably causing a crash."

Change-Id: Ia5ca45e35766a7cebf0b53bcac1bd9dff29ad6ea
Reviewed-on: https://gerrit.libreoffice.org/9259
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>