updated Sinatra adapter - partial fix for issue 80
reverting ca37d8a959c4533de151f7974721c70330c7d661, use LOWER and not ILIKE

ILIKE is NOT indexed in Postgres:

# EXPLAIN SELECT * FROM users WHERE email ILIKE 'databyte@example.com';
                              QUERY PLAN                              
----------------------------------------------------------------------
 Seq Scan on users  (cost=0.00..62156.96 rows=28 width=1631)
   Filter: ((email)::text ~~* 'databyte@example.com'::text)
(2 rows)

When using LOWER, you need an index for it:

def up
  connection.execute "CREATE INDEX index_users_on_lower_email ON users (LOWER(email));"
end

def down
  connection.execute "DROP INDEX index_users_on_lower_email"
end

# EXPLAIN SELECT * FROM users WHERE LOWER(email) = 'databyte@example.com';
                                             QUERY PLAN                                             
----------------------------------------------------------------------------------------------------
 Index Scan using index_users_on_lower_email on users  (cost=0.00..8.50 rows=1 width=1631)
   Index Cond: (lower((email)::text) = 'databyte@example.com'::text)
(2 rows)
Merge branch 'master' of git://github.com/databyte/authlogic