Add hook for custom auto-index action

This allows us to cleanly do async indexing

Change-Id: I269ecdabfc2dab319fc2c9df3b425da8912db94d
Reviewed-on: https://gerrit.causes.com/18754
Reviewed-by: Lann Martin <lann@causes.com>
Tested-by: Jeremy Dunck <jeremy.dunck@causes.com>