Array attribute relations

took #3918 and added tests for elasticsearch.
Tests are only failing because of #4379.

@qiangxue what do you think? Imo this is good to merge.

fixes #1249, closes #3918, fixes #4379
For linking, it's possible that the models being linked are in dirty state. That's why `save()` is used without specifying the attributes.