Temporary fix until main Cancan repo is updated.

* Fixes the problem with Rails 4, where ActiveRecord::Relation is no
 longer recognized as Array, which gives problems when defining abilities
 with joins
* See https://github.com/ryanb/cancan/issues/916
id_param now returns nil when the param is nil