Enable LTO on some projects.
Don't build avplay: We don't use it.
Other minor code changes, mostly code style.