Japan's core machinery orders unexpectedly rose for a second straight month in July, easing some pessimism over capital expenditure.