SmartOS fixes, HAProxy 1.5-dev, and some package updates

This is the cleaned-up version of: https://github.com/NixOS/nixpkgs/pull/2117