use the ContinuousQuery structure instead of an interface
fix #360. Store and recover continuous queries on startup