JavaScript: optimize memory footprint
JavaScript: optimize memory footprint

Change-Id: I061b3863a25e2022d91b17fd97f9ee5340e9dd5a

aldebaran/libqi,aldebaran/libqi,aldebaran/libqi-java,bsautron/libqi,aldebaran/libqi,aldebaran/libqi-java,vbarbaresi/libqi,aldebaran/libqi-java