Fixed #282 - SP and MP now use libpng instead of relying on hand-rolled
implementations. Also moved common dependencies into the lib/ folder. As a
result, had to tweak a lot of files!