libaura: Return NULL in some cases. - Fail if there's not enough memory for allocating num_buckets or if the method is unknown. - Add test.