What two nations were created though the unification of many smaller kingdoms by 1871?