Fix bug related with pagination

There was a bug which avoided to render the errorCode with "details=on". Render methods have been modified and also some unit tests that were broken with the modifications.
Regarding the else, I'm not sure it should be right to put i back. Remember that we decide to slightly break the "one only of them" in the case of "details=on", as explained in the documentation (https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide#Pagination)

> details (allowed values are “on” and “off”, default is “off”), in order to get a global errorCode for the response including a count of total elements (in the case of using “on”). Note that using details “on” slightly breaks NGSI standard, which states that global errorCode must be used only in the case of general error with the request. However, we think it is very useful for a client to know in advance how many results in total the query has (and if you want to keep strict with NGSI, you can simply ignore the details parameter :) 

Regarding detecting situation in which there is no contextElementResponseVector (i.e. its size equal to 0) and SccNone at the same time, yes... probably we should detect that and fill in errorCode with 500 Internal Error.