Load a has_one target for a new record if possible

Fixes #18086
@sgrif the logic in `HasManyAssociation#foreign_key_present?` differs a bit because it takes into account inheritance for `HasManyThroughAssociation#foreign_key_present?` – therefore it checks whether associated table has primary key (6a91a3307ff6556225ab8717617074cea20222e0).

But this is a harmless difference and can be used in `HasOneAssociation#foreign_key_present?`. But a hard choice is how to share this implementation across `HasOne` and `HasMany/HasManyThrough`.

- They only common ancestor is abstract `Association` and it's better not to interleave it with implementation details.
- Extracting to `reflection` would require passing `owner` and dirtying interface between them.
- Implementation can be extracted to module but I'm not sure a one-line implementation is worth such a trade-off (in case requirements change we'd need to break them back apart).

My vote is to leave them apart. But it's up to you.