test/bloom_tests: Use UL suffix for unsigned long number to ensure compatibility
Fix memory leak, refactor to be more pythonic, maintainable, and possibly faster.