Add doctrine support with mongo, do some tests, still some bugs left.