js/loader: stop pending subcontainer requests

When redrawing a container we should cancel it's subcontainers pending
requests. This also fixes stopPendingRequestsFor(), it didn't really
work before.