Remove redundant and duplicated code in class ContextAPI
Remove redundant and duplicated code in class ContextAPI

Remove redundant checks for existence of parameters (methods
getRegex(JSONObject) and getContextName(JSONObject)), the parameters are
already mandatory thus guaranteed to exist.
Remove duplicated code, in action "exportContext", by using a function
already available, that returns a context with a given name and replace
the code in getContext(String) that searched for a context
with a name with Session.getContext(String), which does exactly the same
thing.
Change to search for the context only once in the action
"setContextInScope" and remove redundant check for existence of
parameter (it's mandatory).
Add JavaDoc to getContext(JSONObject) which explain the preconditions
(the parameter contextName must exist, which it does if the parameter is
mandatory).

UjuE/zaproxy,MD14/zaproxy,0xkasun/zaproxy,Harinus/zaproxy,JordanGS/zaproxy,Harinus/zaproxy,NVolcz/zaproxy,mabdi/zaproxy,zaproxy/zaproxy,UjuE/zaproxy,veggiespam/zaproxy,ozzyjohnson/zaproxy,thc202/zaproxy,thc202/zaproxy,MD14/zaproxy,rajiv65/zaproxy,Harinus/zaproxy,zapbot/zaproxy,gmaran23/zaproxy,gsavastano/zaproxy,psiinon/zaproxy,mabdi/zaproxy,gsavastano/zaproxy,kingthorin/zaproxy,gmaran23/zaproxy,gsavastano/zaproxy,profjrr/zaproxy,meitar/zaproxy,zapbot/zaproxy,gsavastano/zaproxy,rajiv65/zaproxy,meitar/zaproxy,UjuE/zaproxy,DJMIN/zaproxy,NVolcz/zaproxy,urgupluoglu/zaproxy,Harinus/zaproxy,JordanGS/zaproxy,zaproxy/zaproxy,meitar/zaproxy,thc202/zaproxy,rajiv65/zaproxy,kingthorin/zaproxy,gmaran23/zaproxy,urgupluoglu/zaproxy,rajiv65/zaproxy,NVolcz/zaproxy,gmaran23/zaproxy,lightsey/zaproxy,mabdi/zaproxy,thamizarasu/zaproxy,Harinus/zaproxy,mustafa421/zaproxy,tjackiw/zaproxy,DJMIN/zaproxy,zaproxy/zaproxy,ozzyjohnson/zaproxy,rajiv65/zaproxy,cassiodeveloper/zaproxy,mustafa421/zaproxy,Ali-Razmjoo/zaproxy,Ye-Yong-Chi/zaproxy,Ali-Razmjoo/zaproxy,meitar/zaproxy,zaproxy/zaproxy,mabdi/zaproxy,thamizarasu/zaproxy,cassiodeveloper/zaproxy,Ye-Yong-Chi/zaproxy,urgupluoglu/zaproxy,kingthorin/zaproxy,0xkasun/zaproxy,Ye-Yong-Chi/zaproxy,lightsey/zaproxy,veggiespam/zaproxy,pdehaan/zaproxy,tjackiw/zaproxy,gmaran23/zaproxy,pdehaan/zaproxy,thc202/zaproxy,jorik041/zaproxy,surikato/zaproxy,jorik041/zaproxy,thc202/zaproxy,NVolcz/zaproxy,veggiespam/zaproxy,gsavastano/zaproxy,UjuE/zaproxy,pdehaan/zaproxy,thc202/zaproxy,thamizarasu/zaproxy,kingthorin/zaproxy,Ali-Razmjoo/zaproxy,thamizarasu/zaproxy,lightsey/zaproxy,jorik041/zaproxy,JordanGS/zaproxy,tjackiw/zaproxy,thamizarasu/zaproxy,urgupluoglu/zaproxy,UjuE/zaproxy,0xkasun/zaproxy,DJMIN/zaproxy,Ali-Razmjoo/zaproxy,JordanGS/zaproxy,zaproxy/zaproxy,zapbot/zaproxy,psiinon/zaproxy,Harinus/zaproxy,zapbot/zaproxy,pdehaan/zaproxy,pdehaan/zaproxy,zaproxy/zaproxy,UjuE/zaproxy,MD14/zaproxy,DJMIN/zaproxy,profjrr/zaproxy,mabdi/zaproxy,MD14/zaproxy,psiinon/zaproxy,Ye-Yong-Chi/zaproxy,profjrr/zaproxy,zapbot/zaproxy,urgupluoglu/zaproxy,Ali-Razmjoo/zaproxy,Ali-Razmjoo/zaproxy,ozzyjohnson/zaproxy,0xkasun/zaproxy,ozzyjohnson/zaproxy,psiinon/zaproxy,meitar/zaproxy,surikato/zaproxy,tjackiw/zaproxy,mustafa421/zaproxy,DJMIN/zaproxy,veggiespam/zaproxy,surikato/zaproxy,ozzyjohnson/zaproxy,Ye-Yong-Chi/zaproxy,zapbot/zaproxy,NVolcz/zaproxy,profjrr/zaproxy,DJMIN/zaproxy,veggiespam/zaproxy,zaproxy/zaproxy,psiinon/zaproxy,0xkasun/zaproxy,JordanGS/zaproxy,urgupluoglu/zaproxy,tjackiw/zaproxy,profjrr/zaproxy,cassiodeveloper/zaproxy,cassiodeveloper/zaproxy,tjackiw/zaproxy,urgupluoglu/zaproxy,lightsey/zaproxy,ozzyjohnson/zaproxy,thamizarasu/zaproxy,cassiodeveloper/zaproxy,UjuE/zaproxy,gmaran23/zaproxy,Ye-Yong-Chi/zaproxy,0xkasun/zaproxy,rajiv65/zaproxy,DJMIN/zaproxy,NVolcz/zaproxy,zapbot/zaproxy,kingthorin/zaproxy,pdehaan/zaproxy,meitar/zaproxy,profjrr/zaproxy,gsavastano/zaproxy,surikato/zaproxy,kingthorin/zaproxy,cassiodeveloper/zaproxy,NVolcz/zaproxy,thc202/zaproxy,ozzyjohnson/zaproxy,mustafa421/zaproxy,mabdi/zaproxy,lightsey/zaproxy,JordanGS/zaproxy,profjrr/zaproxy,kingthorin/zaproxy,JordanGS/zaproxy,lightsey/zaproxy,jorik041/zaproxy,thamizarasu/zaproxy,MD14/zaproxy,rajiv65/zaproxy,Ye-Yong-Chi/zaproxy,surikato/zaproxy,pdehaan/zaproxy,psiinon/zaproxy,veggiespam/zaproxy,MD14/zaproxy,jorik041/zaproxy,mustafa421/zaproxy,jorik041/zaproxy,jorik041/zaproxy,Harinus/zaproxy,0xkasun/zaproxy,psiinon/zaproxy,gsavastano/zaproxy,mustafa421/zaproxy,surikato/zaproxy,veggiespam/zaproxy,mustafa421/zaproxy,meitar/zaproxy,lightsey/zaproxy,gmaran23/zaproxy,meitar/zaproxy,tjackiw/zaproxy,Ali-Razmjoo/zaproxy,MD14/zaproxy,mabdi/zaproxy,cassiodeveloper/zaproxy,surikato/zaproxy