It is weird that some of the Sony Xperia Z2 firmwares have this Close All Button and some don’t. Fortunately, there is an easy way to fix this. An XDA user has taken this from the ROM that has this close all button hack.
All you have to do is flash this file via custom recovery or unzip it, put in correct folder ("root/system/vendor/overlay) and chance permission to 644 and reboot. To remove the close button button, go to "root/system/vendor/overlay" and delete file "com.android.systemui-res-305.apk". Reboot and you are done.