popcnt: various improvements

 *  Use D_InlineAsm_

 *  Add unittests for 64 bit integers

 *  Only use popcnt on systems we have an implementation for

 *  Make popcnt_32 and popcnt_64 immutable

 *  Allow implicit casts of smaller integers.