Made database alternative safer

Current status:
- Fixed template loading using database
- Writes will be done to database although it will raise error on the
  client side.
- Can't afford to write to database for confession. Requires redis.llen
  to be called to get the next number of confession, for consistency.