Make 'belongsTo' function return cached value if available

When acting as a sync getter, the 'bleongsTo' function should return the cached value if available, not the fk. This makes it very valuable in views, so that we can prefetch the related models in the controller by using an async call (or 'input') and use the sync getter in the views.