Allow url option to be a function

Uses `_.result` like Backbone core.