Refactor relations

Allow `params.primaryKey` option to explicitly set the primary key of the related model; this was sometimes deduced using `dataSource.idName()`, but lacked consistency and not all relations allowed this to be user-defined.

The old `params.idName` option was renamed to `params.primaryKey`, to mirror the `params.foreignKey` option.