API: Fix rate limiting for Google App Engine

Rate-limit clients only if they haven't set their own UA string and if
it doesn't include an App ID (see http://goo.gl/kiJyT#c4).