Added support for multiple ids/pks in custom dump primary object

I have found custom dump very useful, however it did not support multiple primary objects (as `dump_object` does).

Thus I have added support for multiple ids in `custom_dump` as similar to `dump_object`