elfctl: avoid touching file if no change made
Suggested by: brooks
Reviewed by: brooks, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30452
(cherry picked from commit 3f2508b7f3855102abed99b846e30e728ba3d04d)