In “The Number 23,” Jim Carrey once again demonstrates that he’s left the slapstick comedy that made him a star far behind and uses his acting skills in yet another genre — the psychological thriller.