Remove some HEAD-related code
Update erlang R14 and R15 with changes from core
Add :autoconf deps where missing