[4.2] Model : firstByAttributes

Set `firstByAttributes` as public so it can be used outside the `Model` class.

Also add `$fail` flag (default to `false`) : if no instance of the model is found, a `ModelNotFoundException` will be thrown.