Added LICENSE.txt and preformed several code optimizations to remove some redundant redundancies, optimizing the code.

I know that there is a copy in [`doc/lgpl-2.1.txt`](https://github.com/minetest/minetest/blob/master/doc/lgpl-2.1.txt), [but keeping a LICENSE.txt in the main directory is recommended by GitHub](https://help.github.com/articles/open-source-licensing#where-does-the-license-live-on-my-repository "GitHub help: Open Source Licensing").

[License](http://choosealicense.com/licenses/lgpl-v2.1 "LGPL v2.1 - ChooseALicense.com")