adds getIdea functionality that returns a random idea if no ideaId or no valid ideaId is sent.  Also increments frequency of hat or site frequencies in database according to where the request came from