Purge LGPL from the project

### Motivation
There are a bunch of files in the repo having `LGPL` headers, probably due to copy-pasting. Some of them are legitimate, since the code is borrowed. The rest should be purged, as we are licencing under `MIT`. This PR exposes all such places and is meant to be a discussion thread.

### Changelog:
* Purge `LGPL` headers from the repo files.
* Drop the ` #!/usr/bin/env python` preamble in all files lacking a `main` function or equivalent code.