Band structure, superconductivity and polytypism in AuSn$_4$