Feature/reduce planning elements api memory

This aims to ease the memory and performance issues noted on OP:
https://www.openproject.org/work_packages/9574

The main approach is to avoid using OpenStructs as they are reported to be slow and memory intensive:
* http://ruby-lang-love.blogspot.de/2011/05/short-story-about-openstruct-and.html
* http://stackoverflow.com/questions/1177594/ruby-struct-vs-openstruct

Unfortunately I haven't found more elaborate information.

On my system, having about 900 work packages in the tested project, the response time was reduced by about 50% (1000ms -> 500 ms) with the fix for json answers. XML responses have a similar drop in response time while still taking twice as much time as json responses. Continuously producing requests, the memory was also reduced by 50% (800MB -> 400MB).