Thermo Fisher Scientific Inc. has notified the state that it plans to lay off employees at two Massachusetts sites and close a third entirely.