Standard Bases and Primary Decomposition: The F4-Algorithm for Euclidean Rings and Efficient Algorithm for Primary Decomposition over Rings