Improve pagination handling in proposals.py
Improve pagination handling in proposals.py

Previously if multiple pages were returned then the script would lose the results. 

A check to ensure the response is an array was also added. This helps avoid somewhat cryptic errors when iterating over non-lists (eg: error messages, bad output, etc)
matrix-org/matrix-doc,matrix-org/matrix-doc,matrix-org/matrix-doc,matrix-org/matrix-doc