Speed up integer casting from DB
Speed up integer casting from DB

We don't have the check the range when the value is coming from the DB,
so override type_cast_from_database to short-circuit the extra work.
The difference is huge but the absolute gain is quite small. That being
said this is a hotspot and it showed up on the radar when benchmarking
discourse.

illacceptanything/illacceptanything,esparta/rails,rossta/rails,georgeclaghorn/rails,vipulnsward/rails,baerjam/rails,gfvcastro/rails,illacceptanything/illacceptanything,richseviora/rails,Vasfed/rails,bradleypriest/rails,flanger001/rails,tgxworld/rails,illacceptanything/illacceptanything,matrinox/rails,Edouard-chin/rails,mtsmfm/railstest,sergey-alekseev/rails,rails/rails,kaspth/rails,kenta-s/rails,Vasfed/rails,EmmaB/rails-1,yahonda/rails,mechanicles/rails,Stellenticket/rails,coreyward/rails,marklocklear/rails,yahonda/rails,shioyama/rails,jeremy/rails,richseviora/rails,Vasfed/rails,kamipo/rails,koic/rails,Envek/rails,Erol/rails,felipecvo/rails,shioyama/rails,Stellenticket/rails,voray/rails,printercu/rails,Sen-Zhang/rails,illacceptanything/illacceptanything,marklocklear/rails,mijoharas/rails,joonyou/rails,sergey-alekseev/rails,kaspth/rails,hanystudy/rails,arunagw/rails,lcreid/rails,Stellenticket/rails,prathamesh-sonpatki/rails,mechanicles/rails,pschambacher/rails,matrinox/rails,ttanimichi/rails,illacceptanything/illacceptanything,mijoharas/rails,kmayer/rails,palkan/rails,gauravtiwari/rails,betesh/rails,kmcphillips/rails,kamipo/rails,gfvcastro/rails,eileencodes/rails,hanystudy/rails,brchristian/rails,fabianoleittes/rails,88rabbit/newRails,tjschuck/rails,flanger001/rails,baerjam/rails,yasslab/railsguides.jp,Envek/rails,Edouard-chin/rails,tjschuck/rails,kirs/rails-1,schuetzm/rails,repinel/rails,yasslab/railsguides.jp,lcreid/rails,betesh/rails,deraru/rails,palkan/rails,MichaelSp/rails,Erol/rails,assain/rails,Spin42/rails,iainbeeston/rails,lcreid/rails,prathamesh-sonpatki/rails,mechanicles/rails,printercu/rails,marklocklear/rails,fabianoleittes/rails,arjes/rails,Stellenticket/rails,untidy-hair/rails,mtsmfm/rails,kmayer/rails,repinel/rails,esparta/rails,gfvcastro/rails,MSP-Greg/rails,untidy-hair/rails,ngpestelos/rails,pvalena/rails,rafaelfranca/omg-rails,Spin42/rails,amoody2108/TechForJustice,mtsmfm/rails,rbhitchcock/rails,gavingmiller/rails,schuetzm/rails,untidy-hair/rails,arunagw/rails,notapatch/rails,tgxworld/rails,rafaelfranca/omg-rails,gcourtemanche/rails,prathamesh-sonpatki/rails,vassilevsky/rails,BlakeWilliams/rails,vassilevsky/rails,yalab/rails,eileencodes/rails,xlymian/rails,palkan/rails,yalab/rails,rbhitchcock/rails,gcourtemanche/rails,amoody2108/TechForJustice,ledestin/rails,yalab/rails,illacceptanything/illacceptanything,riseshia/railsguides.kr,illacceptanything/illacceptanything,betesh/rails,flanger001/rails,kddeisz/rails,illacceptanything/illacceptanything,prathamesh-sonpatki/rails,bradleypriest/rails,kirs/rails-1,yhirano55/rails,schuetzm/rails,aditya-kapoor/rails,tijwelch/rails,bolek/rails,illacceptanything/illacceptanything,eileencodes/rails,felipecvo/rails,starknx/rails,illacceptanything/illacceptanything,travisofthenorth/rails,ttanimichi/rails,kmayer/rails,rossta/rails,bogdanvlviv/rails,alecspopa/rails,bogdanvlviv/rails,starknx/rails,kddeisz/rails,sealocal/rails,mechanicles/rails,mathieujobin/reduced-rails-for-travis,kmcphillips/rails,vipulnsward/rails,MSP-Greg/rails,Vasfed/rails,rails/rails,kmcphillips/rails,deraru/rails,vipulnsward/rails,amoody2108/TechForJustice,joonyou/rails,iainbeeston/rails,mtsmfm/railstest,yawboakye/rails,gfvcastro/rails,kddeisz/rails,printercu/rails,ledestin/rails,sergey-alekseev/rails,Envek/rails,yasslab/railsguides.jp,Sen-Zhang/rails,jeremy/rails,tjschuck/rails,maicher/rails,xlymian/rails,lucasmazza/rails,yahonda/rails,elfassy/rails,yhirano55/rails,georgeclaghorn/rails,mohitnatoo/rails,joonyou/rails,illacceptanything/illacceptanything,repinel/rails,yawboakye/rails,coreyward/rails,deraru/rails,vassilevsky/rails,samphilipd/rails,BlakeWilliams/rails,koic/rails,kachick/rails,samphilipd/rails,travisofthenorth/rails,stefanmb/rails,tjschuck/rails,Erol/rails,pvalena/rails,utilum/rails,maicher/rails,yhirano55/rails,mijoharas/rails,richseviora/rails,MichaelSp/rails,BlakeWilliams/rails,matrinox/rails,lucasmazza/rails,shioyama/rails,bogdanvlviv/rails,tgxworld/rails,ttanimichi/rails,odedniv/rails,baerjam/rails,pschambacher/rails,mathieujobin/reduced-rails-for-travis,brchristian/rails,palkan/rails,starknx/rails,vipulnsward/rails,riseshia/railsguides.kr,kirs/rails-1,utilum/rails,xlymian/rails,rails/rails,yhirano55/rails,felipecvo/rails,yalab/rails,assain/rails,rafaelfranca/omg-rails,esparta/rails,repinel/rails,voray/rails,alecspopa/rails,hanystudy/rails,koic/rails,travisofthenorth/rails,printercu/rails,samphilipd/rails,yahonda/rails,riseshia/railsguides.kr,mohitnatoo/rails,MichaelSp/rails,illacceptanything/illacceptanything,betesh/rails,coreyward/rails,aditya-kapoor/rails,schuetzm/rails,lcreid/rails,arjes/rails,aditya-kapoor/rails,Edouard-chin/rails,jeremy/rails,eileencodes/rails,esparta/rails,rossta/rails,utilum/rails,deraru/rails,stefanmb/rails,bolek/rails,MSP-Greg/rails,kamipo/rails,tijwelch/rails,odedniv/rails,MSP-Greg/rails,notapatch/rails,gavingmiller/rails,shioyama/rails,baerjam/rails,elfassy/rails,flanger001/rails,fabianoleittes/rails,rails/rails,kachick/rails,odedniv/rails,EmmaB/rails-1,mtsmfm/railstest,notapatch/rails,sealocal/rails,mtsmfm/rails,arunagw/rails,voray/rails,untidy-hair/rails,lucasmazza/rails,88rabbit/newRails,ngpestelos/rails,Spin42/rails,tgxworld/rails,georgeclaghorn/rails,georgeclaghorn/rails,travisofthenorth/rails,pschambacher/rails,alecspopa/rails,gauravtiwari/rails,illacceptanything/illacceptanything,Sen-Zhang/rails,Envek/rails,maicher/rails,mohitnatoo/rails,joonyou/rails,utilum/rails,gavingmiller/rails,elfassy/rails,Erol/rails,yawboakye/rails,kaspth/rails,kddeisz/rails,ngpestelos/rails,pvalena/rails,kenta-s/rails,bogdanvlviv/rails,riseshia/railsguides.kr,illacceptanything/illacceptanything,kenta-s/rails,iainbeeston/rails,yawboakye/rails,Edouard-chin/rails,illacceptanything/illacceptanything,gcourtemanche/rails,yasslab/railsguides.jp,gauravtiwari/rails,assain/rails,tijwelch/rails,aditya-kapoor/rails,bradleypriest/rails,kachick/rails,notapatch/rails,mohitnatoo/rails,iainbeeston/rails,brchristian/rails,BlakeWilliams/rails,88rabbit/newRails,pvalena/rails,mathieujobin/reduced-rails-for-travis,sealocal/rails,kmcphillips/rails,EmmaB/rails-1,rbhitchcock/rails,arjes/rails,bolek/rails,jeremy/rails,arunagw/rails,fabianoleittes/rails,stefanmb/rails,ledestin/rails,assain/rails