[Proposal] Let BelongsToMany->sync return affected IDs - pointing to 4.1

Updated pull request of [#2656] to point to 4.1 as per @taylorotwell's request in [#2656]