Use __builtin_popcountl if available to replace Ones() in GetImage.c
If the compiler knows of a better algorithm for counting the number of bits set in a word for the target CPU, let it use that, instead of the classic algorithm optimized for PDP-6.
Based on libXext commit 490a25e6f8a4d2482af4364c700b68ad11a4d10b
Signed-off-by: Alan Coopersmith alan.coopersmith@oracle.com