President’s executive actions come in the wake of two mass shootings and pressure on legislators to pass more lasting laws.