Add: ability to bulk insert using a generator

This PR add support to bulk insert using a generator.

The function `_do_batched_insert` at `message.py` already handles bulk insertion of a long list very well.

This PR passes all test.