Learning to Reason With Relational Abstractions