If you wish to cancel your delegation all you need to do is simply set the amount delegated to 0 in the same way which you delegated.
If you're doing this via SteemConnect simply comment the following URL:
Within this you will want to add your account, you should do this by replacing <youraccount>, then you want to add the account you wish to to remove the delegation from by replacing <theiraccount> and the finally the amount you wish to now delegate. This is already set to zero.
Remember it will take 7 days for you Steem Power to be available for you to vote with again.
Well after the HF20 the cancellation of Sp now takes 5 days to return as in the past it took 7 days to get back to the owner.
While there are few ways that you can get your Delegated Sp back but the one that I usually use for now is
In the username tab put your name on it and than search for the delegation tab and there you will see all the Incoming/ Outgoing / Expiration delegations
On the outgoing tab you will see your delegated SP and there there just hit the cross mark and it will redirect you to the next step and follow it using your active key you will be able to revoke your active delegation.