Query by cookbook name in a consistent manner

Since cookbook names should be unique (case-insensitive), we must be
careful to query for cookbooks by name in a way that respects that. We
could continue to query by LOWER(name), but Rails's Ruby schema language
does not preserve Postgres expression indices, and building in support
for such things is not a high priority at the moment. SQL schema dumping
is not a viable option, either.
Merge pull request #335 from opscode/consistent-cookbook-queries

Query by cookbook name in a consistent manner