Bug 1000839: Fixes and unit tests for NfcUtils.encodeNDEF()

I wouldn't use ```.forEach()``` here, because I'm modyfing ```plenArray``` in a loop. I will rewrite it, though, to be more concise. But  I'll leave ```for``` loop here, unless you have some better suggestion?