Update Editmode.php

Editmode controller plugin: only include the pimcore jQuery library when it hasn't alread been included in the response body to prevent it from overwriting previously loaded jQuery extensions.
Also cleaned up the control structures a bit.