Fixed bug with class inheritance and attribute and view's in subclasses

An included module is inserted into the inheritance chain so the
proper Couchbase::Model derived ancestor was not being selected.

Change-Id: Id748d14b28fc567473ff484720406baedf790e68
Reviewed-on: http://review.couchbase.org/24693
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>