My english is not so good and I still have problems with on, in, at. But I think both setences would be correct.
I undertand the sentence "There is sugar on that cake", as the cake has sugar over it, and "There is sugar in that cake", as the cake has sugar inside it ( I don't know if I am right.)
Whatever, the sentence in portuguese "Tem açucar nesse bolo", doesn't indicate if the sugar is over and/or inside the cake, what can make the two situations possible and both setences should be accept.
It is because "naquilo" is neutral. Although "naquile" (masc.) or "naquila" (fem.) should work depending on the gender of the noun.
Check out this helpful explaination. http://streetsmartbrazil.com/difference-between-este-and-esse-portuguese/
Correct. These forms are contractions of em + o = no and em + a = na. In this book - neste livro (em +este = in this = neste). On this page - nesta página.
There are too many other similar contractions to mention here as they are mainly used in Continental Portuguese and not in the Brazilian version.
Such as lhes + o = lhos. This version is not used in Brazil.
The choice of 'esse' or 'essa' is a function of gender, as you clearly know.