[4.2] Add updateOrCreate() function

Also closes https://github.com/laravel/framework/pull/3792