First-principles determinations of magneto-crystalline anisotropy and magnetostriction in bulk and thin-film transition metals