How can I mount a TV to the wall so that it folds away?
The question might be, where are you thinking to fold it away to? There is no room there. I would certainly try something like this first:

http://www.amazon.com/Coredy-Graphics-Multiple-Monitors-1920/dp/B0129CP6BO/ref=sr_1_1?ie=UTF8&amp;qid=1448758981&amp;sr=8-1&amp;keywords=hdmi+to+vega+adapter

This would certainly be much cheaper and less hassle. 

Start with the easiest cheapest solution and work you way up. 

Save yourself lots of time and energy in the process.

Happy Saturday!