fix hasOne when foreignKey#field defined

get include query accessing the foreign key field in th abstract query generator on include queries
unit test added that breaks without the fix
I believe `foreignKey` is only defined if the user specifically specifies it in the options, while `identifier` either contains `foreignKey` or the default value. But I'm not sure we need that distinction