[Sluggable] Use anchored regex query in ODM adapter
[Sluggable] Use anchored regex query in ODM adapter

Using an anchored regex query will take advantage of MongoDB indexes. See: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-RegularExpressions

After implementing this fix on an older branch, I realized it builds upon: 96550fd512af1decc7042cfa8d77fd0f41f2111b. This commits adds the fix to replaceRelative() and also uses preg_quote() for escaping the slug in the MongoRegex pattern.

anesse/DoctrineExtensions,bendavies/DoctrineExtensions,craue/DoctrineExtensions,tyx/DoctrineExtensions,jeroendesloovere/DoctrineExtensions,sroze/DoctrineExtensions,marc-j/DoctrineExtensions,Engerim/DoctrineExtensions,cmfcmf/DoctrineExtensions,lafourchette/DoctrineExtensions,tomazahlin/DoctrineExtensions,Viburnum/DoctrineExtensions,mablae/DoctrineExtensions,notrix/DoctrineExtensions,birko/DoctrineExtensions,bocharsky-bw/DoctrineExtensions,nirav-programmer/DoctrineExtensions,stof/DoctrineExtensions,eliberty/DoctrineExtensions,blazarecki/DoctrineExtensions,edigu/DoctrineExtensions,teohhanhui/DoctrineExtensions,akd3vs/DoctrineExtensions,aplysie/DoctrineExtensions,aramalipoor/DoctrineExtensions,rubenrua/DoctrineExtensions,SocialbitGmbH/DoctrineExtensions,Padam87/DoctrineExtensions,pmishev/DoctrineExtensions,CiscoVE/DoctrineExtensions,hhjcz/DoctrineExtensions,jmcclell/DoctrineExtensions,lengpiseth/DoctrineExtensions,gadelkareem/DoctrineExtensions,l3pp4rd/DoctrineExtensions,Preis24/DoctrineExtensions