correctly translate things that are arrays when saving

if something's an array then we need to translate each element
indvidually.
correctly translate arrays for viewing

If it's an array we need to translate each element of the array
individually rather than handing over the whole thing. In order to
do this we need to pass back the id of links etc so we can compare them.
We don't actually want to hang on to this ID though so throw it away
afterwards as we don't use them.
pass items we're not translating straight through when saving

If we're not going to translate something then we still want to save it
so we just keep the value sent
add translation decorator to index page objects
only apply the translatedDecorator for GET requests

if it's a PUT or POST request then we want the translation objects so
that we can update them when we save
don't create a translation object just for default language

we only want to create an translation object if we are saving in an
alternative language. If we're creating an entry for the default
language then we might as well just save the data as is
search translations and return translated version in autocomplete

Need to set up an or with a regex for all the languages we are using
plus the non language version so we match everything and then apply the
decorator to the results
Make sure translations are applied when converting to JSON

set getters to true which makes sure the decorated get is called when
running toJSON and hence the output is translated. Required to make sure
the JS version used in templates for things like adding memberships is
translated
return empty string for initial virtual if no name

rather than exploding with an error which is not helpful.
sort index pages manually so we use the translations

You can't hand custom sort routines in to mongo so just get back the
results and then sort the resulting array using javascript. Do this post
decorating so we sort on the translated values.