Pinterest says two engineers lost their jobs after writing custom scripts to identify employees who were cut in a recent round of layoffs.