move index hook to lumail.lua

remove the index hook from global.cc and move it to the index() function
in lumail.lua. This way the hook is configured completely as new
behavior in the lua script